Monday, March 26, 2012

Updatepanel + javascript

privatevoid TimerTickMethod(){

HtmlGenericControl inc =newHtmlGenericControl("script");

inc.Attributes.Add("type","text/javascript");

inc.InnerHtml ="alert('Merhaba Dünya');";

Page.Header.Controls.Add(inc);

}

There is no explanation as to what you're trying for? Are you saying that this doesn't work? Try:

private void TimerTickMethod(){ ClientScript.RegisterStartupScript(this.GetType(),"alert('Merhaba Dünya');",true);}

Excuseme, I couldn't write explanation couse i have no time. Now, i can.. Before I couldn't add a javascript code which will work every Tick Event. I just found and sent to forum. It's working now.

No comments:

Post a Comment