Javascript function
function callme() {
var str = '<%=GetString()%>';
alert(str);
}
function ClickAspbtnfromjavacript() //function for clicking asp.net button from javascript
{
document.getElementById('btnID').click();
}
ASP.net (.aspx page)
body onload="callme()"
Code Behind(.cs page)
public string GetString()
{
return "Testing";
}
Disable Previous Dates in Ajax Calendar Control in asp.net
CalendarExtender1.StartDate = System.DateTime.Today;