You must Sign In to post a response.
  • Category: ASP.NET

    Confirm box in asp.net

    Hi All,

    In side button event I disable the textboxes and displaying confirm message box(by calling javascript function from button click event). But when I run the application the textboxes are not disabled until I close the confirm box.

    How to make this. Please help on this
  • #763987
    Please share your piece of code.
    --------------------------------------------------------------------------------
    Give respect to your work, Instead of trying to impress your boss.

    N@veen
    Blog : http://naveens-dotnet.blogspot.in/

  • #763997
    Hai Senthilnathan,
    The behavior is correct. If you write a code to disable the textbox inside the button, till the button click event completes, it will not get disabled.
    So what you can do is to write the JavaScript code for disable the textbox.
    Hope it will be helpful to you.

    Regards,
    Pawan Awasthi(DNS MVM)
    +91 8123489140 (whatsApp), +60 14365 1476(Malaysia)
    pawansoftit@gmail.com

  • #764001
    Hi

    If you need Confirm box in aspx c# code means try this code



    ClientScript.RegisterStartupScript(this.GetType(), "alert", "ShowPopup();", true);

    Name : Dotnet Developer-2015
    Email Id :kumaraspcode2009@gmail.com

    'Not by might nor by power, but by my Spirit,' says the LORD Almighty.

  • #764121
    As client side javascript code executes first and then the server side code that is why server side textbox disabling not executing until client side confirmation not complete. So it is normal.
    If you are unable to do something properly for the first time, call it Version 1.0!

    Thanks & Regards,
    MONOJ BHUINA


Sign In to post your comments