Vinit Patel

how to execute javascript function in code behind page

Posted on: September 25, 2009


There is two ways which i know,

First :=

ClientScript.RegisterStartupScript(GetType(), “ShowContinue”, “ShowContinue();”, true);

second :=

Public m_sScript As String = “”
Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
m_sScript = “<script type=””text/javascript””>ShowContinue()</script>”
End Sub

and put <%=m_sScript%> at the end of the aspx page

Advertisements

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

Calendar

September 2009
M T W T F S S
« Jul   Oct »
 123456
78910111213
14151617181920
21222324252627
282930  

Stats Of Blog

  • 7,092 hits

Cluster Map

%d bloggers like this: