By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,679 Members | 2,469 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,679 IT Pros & Developers. It's quick & easy.

Request object doesn't include items that have a blank value

P: n/a
TS
In my production exceptions i get an email with all the form elements and
their values to debug. the controls that have a blank value are not seen and
it makes my debug job harder (was the control's value blank or was it set
invisible on server so its not in the html).

how do i access all controls whether blank or not?

thanks
Oct 2 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
In code you can iterate through the controls rather than use the form
collection. You will have to know a bit about the ctonrols and cast to the
correct type to grab their values, however.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*************************************************
Think outside of the box!
*************************************************
"TS" <ma**********@nospam.nospamwrote in message
news:uW*************@TK2MSFTNGP03.phx.gbl...
In my production exceptions i get an email with all the form elements and
their values to debug. the controls that have a blank value are not seen
and it makes my debug job harder (was the control's value blank or was it
set invisible on server so its not in the html).

how do i access all controls whether blank or not?

thanks

Oct 2 '06 #2

P: n/a
Hello TS,

As for the non-value form item, do you mean the value of a certain form
item is an empty string? Based on my experience, for those server
controls (which represent html input form elements in html), as long as its
markup is rendered out in page's resposne and it is not disabled, the
postback form collection will contain its value. If you found that the
certain form item's value is empty, the only possible cause is that there
is no input data in the Control/html element. If the server control's
"Visible" is set to "false",it is not rendered out in html response and
you'll not even get it in the postback form collection.

BTW, what's the empty form value's name, is it a child control nested in
other template control(such as FormView, GridView ...)? Also, if you can
ensure the exact page that suffers this problem only, we can concentrate on
that particular page's control tree.

Please feel free to let me know if you have any new finding or have any
other questions we can help.
Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Oct 3 '06 #3

P: n/a
TS
well the thing that made me notice was a ddl (select in html) that wasn't
appearing. I thought there were other controls, but at least i know that a
select with no items won't appear.

that ddl was not set to invisible and it appeared in the html.

So you are saying that if say a textbox is disabled, then it won't be in the
form elements either huh?

thanks

"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:mP**************@TK2MSFTNGXA01.phx.gbl...
Hello TS,

As for the non-value form item, do you mean the value of a certain form
item is an empty string? Based on my experience, for those server
controls (which represent html input form elements in html), as long as
its
markup is rendered out in page's resposne and it is not disabled, the
postback form collection will contain its value. If you found that the
certain form item's value is empty, the only possible cause is that there
is no input data in the Control/html element. If the server control's
"Visible" is set to "false",it is not rendered out in html response and
you'll not even get it in the postback form collection.

BTW, what's the empty form value's name, is it a child control nested in
other template control(such as FormView, GridView ...)? Also, if you can
ensure the exact page that suffers this problem only, we can concentrate
on
that particular page's control tree.

Please feel free to let me know if you have any new finding or have any
other questions we can help.
Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================

This posting is provided "AS IS" with no warranties, and confers no
rights.

Oct 3 '06 #4

P: n/a
Thanks for your reply TS,

Yes, you're right, for those particular html elements such as <select>
list, checkbox, if they have no selected item or is not checked, the
postback data is also empty.

And for disabled html element, they'll not be posted in the http request's
form collection. e.g.

<input type="text" disabled="True" />

Please feel free to let me know if you have any other questions.
Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Oct 4 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.