javascript - Alert not working in UpdatePanel VB.Net -


here have tried.

aspx file:

        <asp:updatepanel id="updatepanel1" runat="server">              <contenttemplate>                  <asp:button onclick="btnok1_click" id="btnok1" runat="server" text="save" />             </contenttemplate>          </asp:updatepanel> 

aspx.vb:

        protected sub btnok1_click(sender object, e eventargs)             dim alertmsg string             dim alertscript string             alertmsg = string.format("you selected {0}", "my message")             alertscript = string.format("<script type= text/javascript>alert('{0}');</script>", alertmsg)             clientscript.registerstartupscript(me.[gettype](), "alert", alertscript)         end sub 

i tried alert box message when clicked button (save) backend. tried solutions stackoverflow. but, codes not work me javascript alert box. event triggers fine , runs through code. me this?

the problem seems lie fact using clientscript rather scriptmanager.

clientscript used synchronous postbacks, whereas scriptmanager asycronous.

see this question more details.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -