String was not recognized as a valid Boolean

G

Guest

We're receiving the following error: "String was not recognized as a valid Boolean" whenever we click button1 then immediately click button2 before allowing the entire page to completely refresh/render. Under normal transaction (not clicking multiple buttons all at the same time), we don't encounter such error

1) Populate hidden fields with string values of "true" or "false
2) Upon post back, convert values of hidden fields into boolea


Highlevel logic of our page that triggers the error.We suspect that clicking 2 buttons almost at the same time fails to properly populate the hidden fields as described in step 1 above. Any ideas on how to gracefully handle the "clicking too fast" scenario? Would appreaciate your suggestions

Thanks
Lester
 
C

Chris Jackson

One thing that comes to mind is handling your button clicks with a client
side script. In your script, first disable the buttons which shouldn't be
pushed without a full round trip, collect and convert your data, and then
submit the form.
 
A

Alvin Bruney [MVP]

I noticed your post went unanswered. Have you resolved this issue?

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
Lester Lee said:
We're receiving the following error: "String was not recognized as a valid
Boolean" whenever we click button1 then immediately click button2 before
allowing the entire page to completely refresh/render. Under normal
transaction (not clicking multiple buttons all at the same time), we don't
encounter such error.
1) Populate hidden fields with string values of "true" or "false"
2) Upon post back, convert values of hidden fields into boolean



Highlevel logic of our page that triggers the error.We suspect that
clicking 2 buttons almost at the same time fails to properly populate the
hidden fields as described in step 1 above. Any ideas on how to gracefully
handle the "clicking too fast" scenario? Would appreaciate your suggestions.
 
R

Rajesh.V

How about a simple js on both buttons which disables the other button.

Alvin Bruney said:
I noticed your post went unanswered. Have you resolved this issue?

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
Lester Lee said:
We're receiving the following error: "String was not recognized as a
valid
Boolean" whenever we click button1 then immediately click button2 before
allowing the entire page to completely refresh/render. Under normal
transaction (not clicking multiple buttons all at the same time), we don't
encounter such error.
1) Populate hidden fields with string values of "true" or "false"
2) Upon post back, convert values of hidden fields into boolean



Highlevel logic of our page that triggers the error.We suspect that
clicking 2 buttons almost at the same time fails to properly populate the
hidden fields as described in step 1 above. Any ideas on how to gracefully
handle the "clicking too fast" scenario? Would appreaciate your suggestions.
Thanks!
Lester
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,152
Members
46,698
Latest member
LydiaHalle

Latest Threads

Top