473,320 Members | 1,846 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,320 software developers and data experts.

Problem retrieving value via Request.Form

Hi,

I have the following code in my form:

Response.Write("<form name='Testing'>");
Response.Write("<INPUT type=hidden id='Testing_txtbox'
name='Testing_txtbox' value='a simple test'>");
Response.Write("</form>");

If I type the following in the very next line, I get a value of
"undefined".

Response.Write("value="+Request.Form("Testing_txtb ox"));

Can anyone tell me why this won't work. If it can't can anyone tell
me how I can retrieve values of hidden controls via Server side code?

Thanks

Jul 22 '05 #1
2 1499
That value won't exist in the Request.Form collection until it is posted by
the client back to the server. "<input type=hidden..." is merely a string
that is being sent back in the response. It has no ties to Request.Form.
That comes from when the visitor of your page submits a form. Then the form
collection will have something called Testing_txtbox.

Ray at work

"Chico" <ck*@ameritech.net> wrote in message
news:35********************************@4ax.com...
Hi,

I have the following code in my form:

Response.Write("<form name='Testing'>");
Response.Write("<INPUT type=hidden id='Testing_txtbox'
name='Testing_txtbox' value='a simple test'>");
Response.Write("</form>");

If I type the following in the very next line, I get a value of
"undefined".

Response.Write("value="+Request.Form("Testing_txtb ox"));

Can anyone tell me why this won't work. If it can't can anyone tell
me how I can retrieve values of hidden controls via Server side code?

Thanks

Jul 22 '05 #2
Add method="post" to your form tag. By default it uses the GET method (ie
uses the querystring) and the form collection is empty...

(you'll likely have also to change the logic as this value is available only
once the user entered something and submitted the form, not during the
initial display).

Patrice

--

"Chico" <ck*@ameritech.net> a écrit dans le message de
news:35********************************@4ax.com...
Hi,

I have the following code in my form:

Response.Write("<form name='Testing'>");
Response.Write("<INPUT type=hidden id='Testing_txtbox'
name='Testing_txtbox' value='a simple test'>");
Response.Write("</form>");

If I type the following in the very next line, I get a value of
"undefined".

Response.Write("value="+Request.Form("Testing_txtb ox"));

Can anyone tell me why this won't work. If it can't can anyone tell
me how I can retrieve values of hidden controls via Server side code?

Thanks

Jul 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Chris Shipley | last post by:
I am trying to present a list of links on a page (Form) where each link opens a different picture gallery. I have the Form page which contains the links, a Gallery page, and several include files....
3
by: Varun | last post by:
Hi There, I have a form("myRequest.asp") and the values from it are retrieved into the page ("output_Print.asp") on which I have two buttons('Save As Complete' and 'Save As Incomplete'). When the...
0
by: WebHouse.Co | last post by:
Hi Sir I'm in my 2nd year in M.Sc. degree & I made a project about the powerful tools SQLXML 3.0 & updategram, so I made a list of programs which r they so similar to the example that using...
12
by: Joel Byrd | last post by:
I am making an AJAX call when any one of a number of inputs in a form (search criteria) are clicked, checked, changed, etc. When the user clicks, checks, whatever, I am trying to display a...
10
by: Girish | last post by:
Hi Everyone, I am passing a form to a php script for further processing. I am able to retrieve the last value set for that given form variable using $variable=$_REQUEST;
6
by: jej1216 | last post by:
I am trying to put together a PHP search page in which the user can select none, one, two, or three fields to search, and then the results php will build the SQL with dynamic where caluses to reflect...
36
by: beebelbrox | last post by:
Hi, I am new VB programming in Access and I am requesting help with the following code. WIndows OS MSaccess 2003 This code is attached to an unbound form that will display a specific recordset...
0
by: shlim | last post by:
Currently I'm using VB.Net to perform a http/https multipart form post to a servlet. I'm able to perform the post using HttpWebrequest via GetRequestStream(). However, the servlet returned me with...
2
by: SV | last post by:
I have a login form with “Remember me on this computer” checkbox. I am creating cookie if checkbox is checked. My code is: If chk_remember.Checked = True Then Dim ckUserName As HttpCookie =...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.