473,406 Members | 2,710 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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

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
4 1683
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Krzysztof Stachlewski | last post by:
I tried to run the following piece of code: Python 2.3.4 (#53, May 25 2004, 21:17:02) on win32 Type "help", "copyright", "credits" or "license" for more information. >>> o = object() >>> o.a...
18
by: Steven Bethard | last post by:
In the "empty classes as c structs?" thread, we've been talking in some detail about my proposed "generic objects" PEP. Based on a number of suggestions, I'm thinking more and more that instead of...
16
by: cwizard | last post by:
I'm calling on a function from within this form, and there are values set but every time it gets called I get slammed with a run time error... document.frmKitAmount.txtTotalKitValue is null or not...
10
by: William L. Bahn | last post by:
I'm looking for a few kinds of feedback here. First, there is a program at the end of this post that has a function kgets() that I would like any feedback on - including style. Second, for...
26
by: yb | last post by:
Hi, Is there a standard for the global 'window' object in browsers? For example, it supports methods such as setInterval and clearInterval, and several others. I know that w3c standardized...
3
by: TS | last post by:
we publish our exceptions to email at work and include the form's vlaues to help debug in production. Since the control wont' appear if it is empty, how can i access it to show the controls wiht a...
2
by: Samuel Shulman | last post by:
I have to create a page that all it does it handle a 'POST' request with some parameters So I created a blank page and in the Load event I try to handle the parameters passed but the page...
7
by: =?Utf-8?B?QVRT?= | last post by:
HOWTO Make CStr for JavaScript on ASP w/ Request.Form and QueryString In ASP, Request.Form and Request.QueryString return objects that do not support "toString", or any JavaScript string...
5
by: Henry Stock | last post by:
I am trying to understand the following error: Any thing you can tell me about this is appreciated. Security Exception Description: The application attempted to perform an operation not allowed...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.