Tuesday, August 19, 2008

Textbox Keyboard Enter Press Execution in ASP.Net

// Client Function Execution By Hitting Enter-Key of Keyboard ...


TextBox_Search.Attributes.Add("onkeydown", "if(event.which || event.keyCode){if ((event.which == 13) || (event.keyCode == 13)) {document.getElementById('" + Button_Search.ClientId + "').click();return false;}} else {return true}; ");

-
ShriKrishna Bhardwaj , With ASP.Net, SQL Server, Javascript

Thursday, August 7, 2008

Loading Gmap from serverside

string lat = "",lat = "";


private void loadmap()
{

HtmlGenericControl Body = this.Master.FindControl("myBody") as HtmlGenericControl;
try
{
if (Body != null)
{
string loadString = "mapload('" + lat + "','" + lng + "','NameOfLocation','./Image/Image.jpg')";
Body.Attributes.Add("onLoad", loadString);
Body.Attributes.Add("onunload", "GUnload()");
}
}
catch (Exception ex)
{
Response.Write("Error:" + ex.ToString());
}
}


-
ShriKrishna Bhardwaj , With ASP.Net, SQL Server, Javascript