Last post Jun 24, 2005 09:10 AM by jhonz
Jun 24, 2005 01:30 AM|jhonz|LINK
I have come across a strange circumstance. I have custom modules with dropdownlists that interact fine during times where the web server has minimal load. But once things pick up and postbacks take longer, my code behind will error out since I expect "ddlSample.SelectedItem.Value"
to have a value for a control that exist. But sometimes it is set to "Nothing". I do think this comes about when the user is a 'quick clicker' and clicks ahead of the postback before it fully is rendered.
The ddl control isn't generated on the fly, it is a static control that is sometimes not visible or within a panel that is not visible.
I am quite perplexed. I thought an object would always be accessible and the load of the server or delay of the postbacks would not make a difference.
Not sure where to start to fix this. I am just doing my best to compensate for the chance that a dropdownlist won't have a selected value. But this still leaves me guessing on what value really was selected.
Any ideas? I am using Visual Studio 2003 with DotNetNuke 2.1.2.
Jun 24, 2005 02:07 AM|fpstevens|LINK
Jun 24, 2005 09:10 AM|jhonz|LINK
I don't use dynamic controls at all at this point so I think I am safe there. Also, I think I would see that error every time the user control is used. Right now, my error only occurs when there is high demand on the server and postbacks are happening
slower than the user is clicking on objects. Have you ever heard of this?
Your second point make sense as well, but in my case I am only reading the value when the error occurs.
Thanks again for your help.