ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "ClientScript", "ShowContentPopup();", true);
Wednesday, July 2, 2014
split string in asp.net
string Argument = "shekhar,amit";
string[] arg = new string[2];
arg = Argument.ToString().Split(',');
Session["LeadId"] = arg[0];
Session["ClientName"] = arg[1];
string[] arg = new string[2];
arg = Argument.ToString().Split(',');
Session["LeadId"] = arg[0];
Session["ClientName"] = arg[1];
get current date in sql
SELECT GETDATE() AS Expr1
FROM StudentAttendence
StudentAttendence --- TableName
FROM StudentAttendence
StudentAttendence --- TableName
get number of records from database with recorddate less than current date in sql
SELECT COUNT(*)
FROM SessionSchedule
WHERE (ID = @sessionScheduleId) AND (fromDate <= GETDATE())
FROM SessionSchedule
WHERE (ID = @sessionScheduleId) AND (fromDate <= GETDATE())
jQuery: remove duplicates from string
data = "val1,val2,val3,val4,val5";
arr = $.unique(data.split(','));
data = arr.join(","); //get unique string back with
Tuesday, July 1, 2014
how to convert var into numeric in javascript
var test1 = new Boolean(true);
var test2 = new Boolean(false);
var test3 = new Date();
var test4 = new String("999");
var test5 = new String("999 888");
var n = Number(test1) + "<br>" + Number(test2) + "<br>" + Number(test3) + "<br>" + Number(test4) + "<br>" + Number(test5);
1
0
1382704503079
999
NaN
var test2 = new Boolean(false);
var test3 = new Date();
var test4 = new String("999");
var test5 = new String("999 888");
var n = Number(test1) + "<br>" + Number(test2) + "<br>" + Number(test3) + "<br>" + Number(test4) + "<br>" + Number(test5);
1
0
1382704503079
999
NaN
select records monthwise from database sql query
SELECT ID, fromDate, toDate
FROM SessionSchedule
WHERE (DATEPART(m, fromDate) = 8)
8- august month
FROM SessionSchedule
WHERE (DATEPART(m, fromDate) = 8)
8- august month
Subscribe to:
Posts (Atom)