Javascript from Server Side


Page.ClientScript.RegisterStartupScript(this.GetType(), “keyForScript”, “alert(‘This is Server side alert box!’)”, true);

ScriptManager.RegisterClientScriptBlock(this,this.GetType(), “key”, “alert(‘This is Server side alert box!’)”, true);¬†//for update panel,have to include “using System.Web.UI;”

Enjoy javascript from Server side

Advertisements

2 Responses to Javascript from Server Side

  1. Lingo asoosa says:

    Not a good method

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: