control autopostback

I have developed an application using asp.net and vb.net....I have set few controls on a page to Autopostback=true. The page refreshes every time they click these controls. But it allows the user to enter fields in other controls while it is refreshing. I would to somehow make sure that user is not able to enter data in any of the fields while it is refreshing. changing cursor would be one option...but i don't know how to do this in web app...
LVL 3
sony1464Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

iboutchkineCommented:
On a clcik event try to register java script
"javascript:this.style.cursor='pointer';" and
"javascript:this.style.cursor='normal';"
sony1464Author Commented:
can u show me a sample code please
iboutchkineCommented:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
 Me.RegisterStartupScript("Error", _
  "<script language='javascript'>this.style.cursor='pointer';</script>")

'do something

End Sub
Become a CompTIA Certified Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

sony1464Author Commented:
The button1_click would still be executed only after the screen refreshes right....I would like the procedure to be called imm after the control is clicked.
iboutchkineCommented:
put it in the control click event or anywhere you need
sony1464Author Commented:
in page_ load i have

Me.chkcity.attributes.add("onClick","javascript:waitcursor();")

and in the client side i havea function

fuction waitcursor()
{

document.body.style.cursor='pointer'
}



The first time i click on the check box the cursor changes and it is good...the second time i click on the check box again....it crashes.....what is the reason....I have IE 6.0
iboutchkineCommented:
I am not really  sure. But you are adding attribute. On a second click you have to remove attribute first
sony1464Author Commented:
I tried attributes.remove before adding.....it still crashes after we click a couple of times.....is there any other way other than changing cursor....i just do not want user to key in during the screen refresh.....thanks for the feedback so far
iboutchkineCommented:
I don't know your code, but maybe you can disable testbox during this period?
RejojohnyCommented:
u could have a check in the javascript to check whether the button is been clicked for the second time .. this can be done by checking the cursor ... then give approriate message ... like this ...

fuction waitcursor()
{
if (document.body.style.cursor !='pointer')
   document.body.style.cursor='pointer'
else
   alert('Processing. Please wait ...');
}

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
sony1464Author Commented:
The application crashes when i try to click the same button after the page has been loaded after the button click. So it is not a problem where the user clicked the same button while it was refreshing.
RejojohnyCommented:
application crashes? do u get an error .. not sure .. could be case because the same code gets run again and again .. do try this ...
fuction waitcursor()
{
if (document.body.style.cursor !='pointer')
   document.body.style.cursor='pointer'
else
{
   alert('Processing. Please wait ...');
   window.event.returnvalue = false;
}
}
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.