Reference site for Sitecore and Dot NET. Call at +91-9910045174 for any Sitecore corporate trainings and workshops.
Surendra Sharma
Search This Blog
Tuesday, May 4, 2010
To get month name from datetime picker in VB.NET
dim str as string=MonthName(dtpAttendance_Date.Value.Month)
To get month name from datefield of a Table in SQL
SELECT DATENAME(month, getdate()) AS 'Month Name'
Command for Redirecting all the file of a folder in a reverse order of Datewise.
D:\> dir *.cs /B /O-D>C:\abc.txt
To Convert variable of one datatype to other in SQL.
DECLARE @mybin1 binary(5), @mybin2 binary(5)
SET @mybin2 = 0xA5
-- No CONVERT or CAST function is necessary because this example concatenates two binary strings.
SELECT @mybin1 + @mybin2
-- A CONVERT or CAST function is necessary because this example concatenates two binary strings plus a space.
SELECT CONVERT(varchar(5), @mybin1) + ' ' + CONVERT(varchar(5), @mybin2)
-- Here is the same conversion using CAST
SELECT CAST(@mybin1 AS varchar(5)) + ' ' + CAST(@mybin2 AS varchar(5))New Line in Multiline TextBox in C#
TextBox1.Text ="RAM" + System.Environment.NewLine;
TextBox1.Text +="RAM" + System.Environment.NewLine;
OR
TextBox1.Text ="RAM" + "\r\n";
TextBox1.Text +="RAM" + "\r\n";
Microsoft Agent in C#
AgentObjects.IAgentCtlCharacter Character;
string
sChar = @"C:\WINNT\msagent\chars\merlin.acs";
agtAgent.Characters.Load("merlin", sChar);
Character = agtAgent.Characters["merlin"];
Character.Show(null);
Character.Play("sad");
Character.Speak("Task
which are yet to completed are ", null);
Check selected value in CheckListBox in ASP.NET
for (int counter = 0; counter < ChecklistBox1.Items.Count; Counter++)
{
if (ChecklistBox1.Items[counter].Selected == true)
{
//True part
}
else
{
//false Part
}
}
Subscribe to:
Posts (Atom)