Think Simple
Lets share our knowledge on ASP.net, C#, SQL Server and other tools and technologies
Pages
Home
ASP.net
C#
Software Architecture
ASP.net Solution
SQL Server
SharePoint
About Me
27 April, 2012
Call JavaScript from Asp.net code behind
Suppose you want to display confirmation message by javascript from asp.net code behind after saving data. Write the following code in your button event.
protected void btnSaved_Click(object sender, EventArgs e)
{
string msg = "Data saved sucessfully";
Page.ClientScript.RegisterStartupScript(this.GetType(), "Alert", "<script type=text/javascript<alert('" + msg + "')</script>");
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment