E
Elliot Rodriguez
I have a form that contains a mix of dynamic controls and declared controls.
All of them are intrinsic .NET controls. Several functions within the page
use Request.Form to query the value of the dynamic controls when the page is
posted back.
I also have a server side function that validates data ensuring it falls
within a given range after the post back. If the range is not valid, I am
Throw-ing a new Exception object; the validation occurs within a Try/Catch
block. The error text is written to a Label and the user is given the
opportunity to fix the value and repost the form.
When the form is reposted, the Request.Forms collection is empty and I get
"Object Reference Not Set..." errors when I try to query
Request.Form("dynamiccontrolname"). If I reload the page, the form attempts
to postback and I continue to get these errors.
Is this behavior by default? Why would Exceptions, if caught and the page
returned to the user in the same state, cause the collection to vanish?
All of them are intrinsic .NET controls. Several functions within the page
use Request.Form to query the value of the dynamic controls when the page is
posted back.
I also have a server side function that validates data ensuring it falls
within a given range after the post back. If the range is not valid, I am
Throw-ing a new Exception object; the validation occurs within a Try/Catch
block. The error text is written to a Label and the user is given the
opportunity to fix the value and repost the form.
When the form is reposted, the Request.Forms collection is empty and I get
"Object Reference Not Set..." errors when I try to query
Request.Form("dynamiccontrolname"). If I reload the page, the form attempts
to postback and I continue to get these errors.
Is this behavior by default? Why would Exceptions, if caught and the page
returned to the user in the same state, cause the collection to vanish?