Groups | Blog | Home
all groups > asp.net > january 2004 >

asp.net : String was not recognized as a valid Boolean


Lester Lee
1/22/2004 11:26:05 PM
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
Chris Jackson
1/26/2004 4:06:20 PM
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.

--
Chris Jackson
Software Engineer
Microsoft MVP - Windows Client
Windows XP Associate Expert
--
More people read the newsgroups than read my email.
Reply to the newsgroup for a faster response.
(Control-G using Outlook Express)
--

[quoted text, click to view]

Alvin Bruney [MVP]
2/3/2004 9:22:52 PM
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
[quoted text, click to view]
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.
[quoted text, click to view]
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.
[quoted text, click to view]

Rajesh.V
2/4/2004 9:28:42 AM
How about a simple js on both buttons which disables the other button.

[quoted text, click to view]

AddThis Social Bookmark Button