javascript - how to use jquery alert plugin with asp.net button control? -


i have bootstrap modal register users.i want show jquery alert user after successful register or alerts.here button.

        <div class="modal-footer">           <asp:button id="btnn_register" runat="server" cssclass="btn btn-primary"  text="register" onclick="btnn_register_click" validationgroup="aaa"  />   </div>     

the code behind:

            protected void btnn_register_click(object sender, eventargs e)     { //some code         if (bluser.check_username() == true)         {             this.clientscript.registerclientscriptblock(this.gettype(), "asdf", "info()", true);          }          else         {                  //do             if (page.isvalid)             {  //some codes              }     

and script:

            <script>         notie.setoptions({             colorsuccess: '#57bf57',             colorwarning: '#d6a14d',             colorerror: '#e1715b',             colorinfo: '#4d82d6',             colorneutral: '#a0a0a0',             colortext: '#ffffff',             animationdelay: 300,             backgroundclickdismiss: true         })          function info() {             notie.alert(4, 'some information', 2)         }          }     }     </script>      

but when run code not work. can me?

did set breakpoint , see if page getting line of code registers script? if not problem in bluser.check_username() function.

also, <script> tag needs <script type="text/javascript" language="javascript"> if doesn't already.


Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

c# - Json.Net Serialize String from URI -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -