473,473 Members | 1,576 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

What happened to the Request.Form?

I've got the following code:

<%= "myText = " + Request.Form["myText"] %>
<form id="Form1" method="post" runat="server">

<input type="text" id="myText">
<input type="button" value="submit">
</form>

Using view->source in IE I see:

<form name="Form1" method="post" action="testform.aspx" id="Form1">
<input type="hidden" name="__VIEWSTATE"
value="dDwxNzg0NjA0NTg0Ozs+i3a+vle2SX4KbtVWA04XJ10 0Y4s=" />
<input type="text" id="myText">
<input type="button" value="submit">
</form>

However you can't access myText in Request.Form when post back. Why isn't it
in Request.Form collection? Is it inside ViewState? Thanks, Moheb
Nov 18 '05 #1
2 1543
It's still there, but it works on the name attribute (like it always has)

<input type="text" id="myText" name="myText" >

Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/
"Moheb" <Mo***@discussions.microsoft.com> wrote in message
news:A7**********************************@microsof t.com...
I've got the following code:

<%= "myText = " + Request.Form["myText"] %>
<form id="Form1" method="post" runat="server">

<input type="text" id="myText">
<input type="button" value="submit">
</form>

Using view->source in IE I see:

<form name="Form1" method="post" action="testform.aspx" id="Form1">
<input type="hidden" name="__VIEWSTATE"
value="dDwxNzg0NjA0NTg0Ozs+i3a+vle2SX4KbtVWA04XJ10 0Y4s=" />
<input type="text" id="myText">
<input type="button" value="submit">
</form>

However you can't access myText in Request.Form when post back. Why isn't it in Request.Form collection? Is it inside ViewState? Thanks, Moheb

Nov 18 '05 #2
My bad. Haven't been working on non-server code for 2 years, thanks-Moheb

"Karl" wrote:
It's still there, but it works on the name attribute (like it always has)

<input type="text" id="myText" name="myText" >

Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/
"Moheb" <Mo***@discussions.microsoft.com> wrote in message
news:A7**********************************@microsof t.com...
I've got the following code:

<%= "myText = " + Request.Form["myText"] %>
<form id="Form1" method="post" runat="server">

<input type="text" id="myText">
<input type="button" value="submit">
</form>

Using view->source in IE I see:

<form name="Form1" method="post" action="testform.aspx" id="Form1">
<input type="hidden" name="__VIEWSTATE"
value="dDwxNzg0NjA0NTg0Ozs+i3a+vle2SX4KbtVWA04XJ10 0Y4s=" />
<input type="text" id="myText">
<input type="button" value="submit">
</form>

However you can't access myText in Request.Form when post back. Why isn't

it
in Request.Form collection? Is it inside ViewState? Thanks, Moheb


Nov 18 '05 #3

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

Similar topics

220
by: Brandon J. Van Every | last post by:
What's better about Ruby than Python? I'm sure there's something. What is it? This is not a troll. I'm language shopping and I want people's answers. I don't know beans about Ruby or have...
6
by: michaaal | last post by:
What is the difference between these two statements? They seem to do the same thing... response.write(request("variable")) response.write(request.querystring("variable"))
4
by: Pavils Jurjans | last post by:
Hallo, I am working on multilingual web-application, and I have to be very sure about how the international characters are encoded and decoded in the client-server form requests. There's a...
5
by: Qazz | last post by:
Yesterday morning, all the ASP Reference Pages were there, and then yesterday afternoon they were all gone!!! For example:...
17
by: Paul | last post by:
HI! I get an error with this code. <SCRIPT language="JavaScript"> If (ifp==""){ ifp="default.htm"} //--></SCRIPT> Basicly I want my iframe to have a default page if the user enters in...
9
by: Jay | last post by:
Everywhere I go (read/browse) I see these parameters.... ByVal sender As Object, ByVal e As System.EventArgs Yet I never see them used within the function/method. Could someone tell me what they...
4
by: Michael Kujawa | last post by:
I am using the following to create an SQL statement using the names and values from request.form. The loop goes through each item in request.form The issue comes in having an additional "and" at...
11
pbmods
by: pbmods | last post by:
A somewhat obscure hack has emerged recently that is an offshoot of the now-infamous XSS. It is known as Cross-Site Request Forgery, or XSRF for short. XSRF is a form of temporary identity theft...
34
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - What online resources are available? ----------------------------------------------------------------------- *...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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,...
1
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.