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

ASPX Form Process

If I have the following:
<HTML>
<FORM ACTION="http://mySite/sample.aspx" METHOD="POST">
Enter your name: <INPUT NAME="FName"><BR>
Favorite Ice Cream Flavor:
<SELECT NAME="Flavor">
<OPTION VALUE="Chocolate">Chocolate
<OPTION VALUE="Strawberry">Strawberry
<OPTION VALUE="Vanilla" SELECTED>Vanilla
</SELECT>
<P><INPUT TYPE=SUBMIT>
</FORM>
</HTML>

How do I retrieve the form values sent to sample.aspx in code??

Any help is appreciated...
--

AR
Nov 18 '05 #1
3 1135
Hi Armando,

Try this in sample.aspx:

Private Sub Page_Load _
(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
If Not IsPostBack Then
Dim strFname As String
Dim strFlavor As String
strFlavor = Request.Form.Item("Flavor")
strFname = Request.Form.Item("FName")
Label1.Text = strFlavor & ":" & strFname
End If
End Sub

Does this help?

Ken
Microsoft MVP [ASP.NET]

"Armando Ruiz" <Ar*********@discussions.microsoft.com> wrote in message
news:94**********************************@microsof t.com...
If I have the following:
<HTML>
<FORM ACTION="http://mySite/sample.aspx" METHOD="POST">
Enter your name: <INPUT NAME="FName"><BR>
Favorite Ice Cream Flavor:
<SELECT NAME="Flavor">
<OPTION VALUE="Chocolate">Chocolate
<OPTION VALUE="Strawberry">Strawberry
<OPTION VALUE="Vanilla" SELECTED>Vanilla
</SELECT>
<P><INPUT TYPE=SUBMIT>
</FORM>
</HTML>

How do I retrieve the form values sent to sample.aspx in code??

Any help is appreciated...
--

AR


Nov 18 '05 #2
Another way is shown here..

http://msdn.microsoft.com/library/de...sformtopic.asp

"Armando Ruiz" <Ar*********@discussions.microsoft.com> wrote in message
news:94**********************************@microsof t.com...
If I have the following:
<HTML>
<FORM ACTION="http://mySite/sample.aspx" METHOD="POST">
Enter your name: <INPUT NAME="FName"><BR>
Favorite Ice Cream Flavor:
<SELECT NAME="Flavor">
<OPTION VALUE="Chocolate">Chocolate
<OPTION VALUE="Strawberry">Strawberry
<OPTION VALUE="Vanilla" SELECTED>Vanilla
</SELECT>
<P><INPUT TYPE=SUBMIT>
</FORM>
</HTML>

How do I retrieve the form values sent to sample.aspx in code??

Any help is appreciated...
--

AR


Nov 18 '05 #3
Thanks Ken, it did help a lot.

"Ken Cox [Microsoft MVP]" wrote:
Hi Armando,

Try this in sample.aspx:

Private Sub Page_Load _
(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
If Not IsPostBack Then
Dim strFname As String
Dim strFlavor As String
strFlavor = Request.Form.Item("Flavor")
strFname = Request.Form.Item("FName")
Label1.Text = strFlavor & ":" & strFname
End If
End Sub

Does this help?

Ken
Microsoft MVP [ASP.NET]

"Armando Ruiz" <Ar*********@discussions.microsoft.com> wrote in message
news:94**********************************@microsof t.com...
If I have the following:
<HTML>
<FORM ACTION="http://mySite/sample.aspx" METHOD="POST">
Enter your name: <INPUT NAME="FName"><BR>
Favorite Ice Cream Flavor:
<SELECT NAME="Flavor">
<OPTION VALUE="Chocolate">Chocolate
<OPTION VALUE="Strawberry">Strawberry
<OPTION VALUE="Vanilla" SELECTED>Vanilla
</SELECT>
<P><INPUT TYPE=SUBMIT>
</FORM>
</HTML>

How do I retrieve the form values sent to sample.aspx in code??

Any help is appreciated...
--

AR


Nov 18 '05 #4

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

Similar topics

3
by: Simon | last post by:
Hi, I have webpage (sql.aspx) in asp.net with a big textbox. In this box, I generate SQL queries. Some of the queries can takes more than 2000 characters lenght. I want to send the content of the...
4
by: DotNetJunkies User | last post by:
Hi All, Hope someone can help me out with this problem. I tried to start a process(notepad.exe) from a web form, but it is not started. Neither the aspnet_wp.exe nor my notepad.exe is shown in...
4
by: Nathaniel Sherman | last post by:
Alright, folks, here's the deal... I'm working on migrating a classic ASP website to an ASP.NET codebase. At the heart of the site is a MySQL database. To make sure an "in-process" program...
24
by: John Rivers | last post by:
ASPX which means ASPX pages, the code-behind concept, User Controls, Web Controls etc. is very poorly designed and makes it extremely hard to develop professional quality web applications. ASPX...
13
by: Matt | last post by:
Does anyone know how to hide the ASPX extension of web pages in ASP.Net 2.0? Thanks, Matt
0
by: samadams_2006 | last post by:
Hello, I have a text box on an ASPX Form in ASP.NET that I would like to have refreshed at a regular interval. Can't seem to get it working. Here's the scenario. I'm reading a number of...
2
by: Damian | last post by:
For about 5 days I've been trying to fix a problem with asp.net on a windows xp media center pc with iis 5.1. Initially I could not debug asp.net applications, and came to discover that aspx and...
6
by: RobGMiller | last post by:
Using ASP.NET 2.0 Need to simply process incoming postback information without sending back a reponse. Client sends HTML from application other than a browser to a page on a web site. Web...
3
by: LamSoft | last post by:
I am not going to write a aspx to connect a SQL Server... but it tries to connect the SQL Server... Some of the Code.. protected void LoginButton_Click(object sender, EventArgs e) { if...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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,...

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.