Persistance medium problem.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I save and get the ViewState from persistance medium in my application
instead of saving it in the hidden field and my program works without
problems except in my login screen. In my login screen I have two
dropdownlists. The first contains the name "Administrator" and any branch
names that the administrator had previously created. The second dropdownlist
contains a list of employees that changes whenever the first list is changed.
The second dropdown list is not created if the first list has selected
Administrator since the Branch is Administrator and the User is Administrator
and it would look funny to display a useless dropdownlist. My problem occurs
when the Internet is very slow and someone switched from a non administrator
to administrator in the first dropdownlist and then clicks the submit button.
Since the first submit has processed the change over to eliminate the second
dropdownlist, the second submit enters application and when the ViewState is
got it does not contain the second list and .Net puts out a message squaking
about the missing list. I wouldn't mind if .Net just threw away the second
submit. I put javascript code in the form on submit to disable the submit
key, but the dropdownlist submit doesn't call the function. I then put
javascript in trap the onclick of the dropdown list to disable the submit
button but the on click occurs as soon as you click on the dropdown list long
before the real submit was issued to my application. I then tried to create
the object but make it invisible but that didn't help either. Does anyone
know of anyway to solve the problem short of creating the object and
disabling it?
 
Try trapping the onChange event by the drop downdownlist. That even is
fired only when the selection in the drodownlist changes.
 
Thank you very much, that solves the problem. I didn't think it would work
since the onchange is already used by .Net to DoPostback but .Net is smart
enough to put the two function together. Thanks Again.
 
Back
Top