UserControl (ascx) - Using Javsscript

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an ascx.

I have some client side JS on the ascx itself.

I want this to run each time my control is loaded.

How can I do this?
 
protected void Page_Load(object sender, EventArgs e)
{
this.Page.RegisterStartupScript("something", "<script
type=\"text/javascript\">alert('I ran.')</script>");
}

Ray at work
 
Back
Top