to execute javascript in aspx.cs
I have written a code for running a timer in javascript ( js ) tht is working fine in aspx file but due to some
reason i need to use tht script in aspx.cs file.
Is there any means to write js in aspx.cs file ?? i have searched google a lot
bt could not find a correct solution....
pls help
Master BillaPosted Sep 23, 2009, 12:47 AM
there is many ways
one way
thank you
Niradhip ChakrabortyPosted Feb 22, 2009, 4:12 PM
Use the following code to call the javascript function from .cs file.
Page.ClientScript.RegisterStartupScript(this.GetType(), "", "ColorChange();", true);
// change the ColorChange() function to your desire javascript function.