Saturday, March 31, 2012
String was not recognized as a valid Boolean
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
LesterOne 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)
--
"Lester Lee" <anonymous@.discussions.microsoft.com> wrote in message
news:45A10F5F-6C2A-4C4B-810C-9F20C298B68D@.microsoft.com...
> 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
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" <anonymous@.discussions.microsoft.com> wrote in message
news:45A10F5F-6C2A-4C4B-810C-9F20C298B68D@.microsoft.com...
> 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
How about a simple js on both buttons which disables the other button.
"Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message
news:%23Zpqv4s6DHA.3052@.TK2MSFTNGP09.phx.gbl...
> 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" <anonymous@.discussions.microsoft.com> wrote in message
> news:45A10F5F-6C2A-4C4B-810C-9F20C298B68D@.microsoft.com...
> > 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
Saturday, March 24, 2012
Strong Naming a dll and registering in GAC
I am working with Microsoft Configuration Application Blocks and whenever I
create a new app and have to use it, I have to reference it and it makes a
local copy in the bin directory.
so if i created 4 apps then there are local copies of these blocks...
I tried to use GACUtil to register these dlls but it gives me an error
saying that its not having a strong name, i tried sn tool but unsuccessful.
I have tried to strong name a dll but the way i did it was in an app where I
first created a strong name and then referenced it in the app before
compiling the dll and then used GAC to register it...
but this is some external dll...
I mean is my thought process right or I am totally off base...
Please advice,
Stephenstephen,
You cannot install an assembly in the GAC without a strong name so you need
to solve this problem first.
After that, you can put copies of strong named, GAC-ed assemblies in a
single folder and reference these from your various apps; you can turn off
the copy local feature, and the copy in the GAC will be automatically used.
Hope that helps,
Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
"stephen" wrote:
Quote:
Originally Posted by
>
Hi,
>
I am working with Microsoft Configuration Application Blocks and whenever I
create a new app and have to use it, I have to reference it and it makes a
local copy in the bin directory.
so if i created 4 apps then there are local copies of these blocks...
>
I tried to use GACUtil to register these dlls but it gives me an error
saying that its not having a strong name, i tried sn tool but unsuccessful.
I have tried to strong name a dll but the way i did it was in an app where I
first created a strong name and then referenced it in the app before
compiling the dll and then used GAC to register it...
but this is some external dll...
>
I mean is my thought process right or I am totally off base...
Please advice,
Stephen
>
>
>