javascript - Page.ClientScript.RegisterStartupScript Not Injecting Script -
i cannot page.clientscript.registerstartupscript
work. have looked through possible suggestions on stackoverflow , other sites, yet nothing seems working. not see "alert" message. kept simplifying code until ended simple html file , line of c# code.
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> </head> <body> <form></form> </body> </html>
and backend c# call:
page.clientscript.registerstartupscript(this.gettype(), "alerttab", "alert('here!')", true);
the script not being appended page (i not see in browser html). have tried surrounding script <script>..</script>
tags has not changed anything.
page.clientscript.registerstartupscript
being called page_load
try this.
page.clientscript.registerstartupscript(gettype(), "alerttab"," <script>alert('here!')</script>", false);
Comments
Post a Comment