c# - Button properties not changing on click event -


it's simple, however, button text , enabled state don't change when page valid.

i have button on web form , following code behind on save click event:

if (page.isvalid) {     btnsave.enabled = false;     btnsave.text = "saving, please wait...";      // save method, etc...         } 

you first setting button enabled state , text, , running saving methods.

this happens server-side, within request caused button click. client browser not receive completed response until after save method has run.

if want button change before save method run, must client-side javascript.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -