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

how to use old INPUT tags

I want to see posted values from old-school INPUT tags, but when I do this:

<form id="Form1" method="post" runat="server">
<input type=text id="test1" value="hello" >
<asp:Button ID="btnSubmit" Text="Submit" Runat="server"></asp:Button>
</form>

in the btnSubmit_Clicked callback I do not see a key for "test1" in the
Request.Forms collection as I would expect. How/where can I see such
submitted values? I do not want to use runat=server.

Brad Williams
Nov 18 '05 #1
3 1136
I figured it out. If you don't use runat="server", then you gotta specify a
name attribute in the INPUT tag. Duh.

"Brad Williams" <sp**@wcsoft.com> wrote in message
news:Oo**************@TK2MSFTNGP11.phx.gbl...
I want to see posted values from old-school INPUT tags, but when I do this:
<form id="Form1" method="post" runat="server">
<input type=text id="test1" value="hello" >
<asp:Button ID="btnSubmit" Text="Submit" Runat="server"></asp:Button>
</form>

in the btnSubmit_Clicked callback I do not see a key for "test1" in the
Request.Forms collection as I would expect. How/where can I see such
submitted values? I do not want to use runat=server.

Brad Williams

Nov 18 '05 #2
Have you tried looking in Request.Form("test1"), rather than
Request.Forms("test1")?

There is no reason why this wouldn't work as usual.
"Brad Williams" <sp**@wcsoft.com> wrote in message
news:Oo**************@TK2MSFTNGP11.phx.gbl...
I want to see posted values from old-school INPUT tags, but when I do this:
<form id="Form1" method="post" runat="server">
<input type=text id="test1" value="hello" >
<asp:Button ID="btnSubmit" Text="Submit" Runat="server"></asp:Button>
</form>

in the btnSubmit_Clicked callback I do not see a key for "test1" in the
Request.Forms collection as I would expect. How/where can I see such
submitted values? I do not want to use runat=server.

Brad Williams

Nov 18 '05 #3
Hey Brad,

Try giving the control the Name attribute rather than just the ID:

<form id="Form1" method="post" runat="server">
<input type=text id="test1" name="test1" value="hello" >
<asp:Button ID="btnSubmit" Text="Submit" Runat="server"></asp:Button>
</form>

Private Sub Page_Load _
(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles MyBase.Load
If IsPostBack Then
Response.Write _
(Request.Form.Item("test1").ToString)
End If
End Sub

Ken
Microsoft MVP [ASP.NET]
"Brad Williams" <sp**@wcsoft.com> wrote in message
news:Oo**************@TK2MSFTNGP11.phx.gbl...
I want to see posted values from old-school INPUT tags, but when I do this:

<form id="Form1" method="post" runat="server">
<input type=text id="test1" value="hello" >
<asp:Button ID="btnSubmit" Text="Submit" Runat="server"></asp:Button>
</form>

in the btnSubmit_Clicked callback I do not see a key for "test1" in the
Request.Forms collection as I would expect. How/where can I see such
submitted values? I do not want to use runat=server.

Brad Williams


Nov 18 '05 #4

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

Similar topics

13
by: clod | last post by:
for example if I have a box where you should put a date how do I keep today date inside that box as default?
2
by: Tom | last post by:
I'm trying to find a good, solid function that sanitizes string values for form validation. The user notes on php.net offer the following: ...
7
by: Eduard Dewolf | last post by:
Hi, Im have been changing my site to make it HTML 4.01 compliant As I should, I wrapped all INPUT tags in blocks I wrapped the not visible INPUT type HIDDEN tags in first PRE, later H6 tags...
0
by: Lea | last post by:
Hi, I 've got a problem concerning the text alignment of my three input tags. In IE6, the "login" and "ok" words are completely aligned on the bottom border. Yet my padding is : 0px 0px 0px 1px;...
2
by: sneill | last post by:
I've noticed that with the following code, the SELECT and INPUT tags don't line up horizontally in IE. Looks great in Mozilla (Firefox). It seems that IE adds a 1 pixel margin top and bottom...
2
by: upersson | last post by:
Hi! When accessing my web page I build up the javascript and html dynamically. Depending on an parameter I want to set all the fields (input tags) readonly. How do I do this? Of course I can...
12
by: Randell D. | last post by:
Folks, I have a form called "ourTestForm". Its a test form - nothing special - it contains five input tags - they are named one, two, three, four and five. The input tags are of type...
5
by: Peter Morris [Air Software Ltd] | last post by:
Hi all I want to allow users to enter HTML, but I want to ensure that A) The HTML entered only contains a subset of html tags (a, img, div, etc) and not certain other elements (html, body,...
1
by: vega80 | last post by:
Hi. I have a problem with assigning an onkeypress-function to dynamically created input-boxes.I want to put the content of an input-field into a tag-list when the user hits enter. This works...
6
by: dougmcdonald | last post by:
Hi All, I have a question regarding the use of the input tag in forms when using xHTML 1.1 strict. Basically I'm getting errors suggesting the input tag is not allowed inside the form e.g:...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
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,...

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.