473,395 Members | 2,253 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,395 software developers and data experts.

Form submitted

Hi all.

I'm like really on the beginning stage for ASP.NET
just got a few questions to ask... Please help me.

I've created a form page called "join.aspx"
and it has lots of codes but the important part needed to
be focused on is the following lines.

<asp:textbox id="firstname" runat="server" />

and the form tag says

<form id="Form1" method="get" runat="server"
action="result.aspx">

Also, i have a button component whose code is

<asp:Button ID="submit" Text="Join" Runat="server"
OnClick="join">

where the subroutine, 'join' is

sub join (s as Object, e as EventArgs)
Response.redirect("result.aspx") 'link page
end sub

The result.aspx has only few lines of codes
<script runat="server">
sub Page_Load
three.text = Request.QueryString("firstname")
end sub
</script>
*** AND ***
<asp:Label ID ="three" Runat="server" />

I was just wondering if the id "firstname" is global in
the same project.
FOr this code, i don't get anything in result.aspx when i
actually put some random name in the firstname textbox
field in join.aspx
Can you tell me what's wrong???
Sorry, im mixing up with ASP and ASP.NET here....
Thanks for bearing me.

Nov 18 '05 #1
5 1145
The problem is that you are not posting to result.aspx,
you're just redirecting.
No "firstname" is not global to the whole project. The
value of this field is posted to the server with each
request. I see that you set action="result.aspx" page, you
were on right track, but you didn't need to do that.
Here's one solution:

Remove action="results.aspx", and add the following code
to "join" sub

sub join (s as Object, e as EventArgs)
Response.redirect("result.aspx?firstname=" &
Server.URLEncode(firstname.text)) 'link page
end sub
-----Original Message-----
Hi all.

I'm like really on the beginning stage for ASP.NET
just got a few questions to ask... Please help me.

I've created a form page called "join.aspx"
and it has lots of codes but the important part needed to
be focused on is the following lines.

<asp:textbox id="firstname" runat="server" />

and the form tag says

<form id="Form1" method="get" runat="server"
action="result.aspx">

Also, i have a button component whose code is

<asp:Button ID="submit" Text="Join" Runat="server"
OnClick="join">

where the subroutine, 'join' is

sub join (s as Object, e as EventArgs)
Response.redirect("result.aspx") 'link page
end sub

The result.aspx has only few lines of codes
<script runat="server">
sub Page_Load
three.text = Request.QueryString("firstname")
end sub
</script>
*** AND ***
<asp:Label ID ="three" Runat="server" />

I was just wondering if the id "firstname" is global in
the same project.
FOr this code, i don't get anything in result.aspx when i
actually put some random name in the firstname textbox
field in join.aspx
Can you tell me what's wrong???
Sorry, im mixing up with ASP and ASP.NET here....
Thanks for bearing me.

.

Nov 18 '05 #2
with asp.net 1.0 and 1.1... you are restricted to form posting to itself.

it if you have a join.aspx... and you have a <form runat="server">
that will always post it to join.aspx.

if you want to post it to result.aspx consider using html form tag
<form name="name" action="wherever you wanna postit" >

with asp.net 1.2 they have a feature which is called Cross Posting (i know i
know many people have been screaming bout it... cause cross posting refers
to posts done on multiple newsgroups ). This cross posting feature would
allow you a <form runat=server> to post to other aspx page as well.. ie with
1.2 you will be able to do what you want to do... but not just yet...

--
Regards,

HD

"Eric Shin" <ya***@yaric.com> wrote in message
news:04****************************@phx.gbl...
Hi all.

I'm like really on the beginning stage for ASP.NET
just got a few questions to ask... Please help me.

I've created a form page called "join.aspx"
and it has lots of codes but the important part needed to
be focused on is the following lines.

<asp:textbox id="firstname" runat="server" />

and the form tag says

<form id="Form1" method="get" runat="server"
action="result.aspx">

Also, i have a button component whose code is

<asp:Button ID="submit" Text="Join" Runat="server"
OnClick="join">

where the subroutine, 'join' is

sub join (s as Object, e as EventArgs)
Response.redirect("result.aspx") 'link page
end sub

The result.aspx has only few lines of codes
<script runat="server">
sub Page_Load
three.text = Request.QueryString("firstname")
end sub
</script>
*** AND ***
<asp:Label ID ="three" Runat="server" />

I was just wondering if the id "firstname" is global in
the same project.
FOr this code, i don't get anything in result.aspx when i
actually put some random name in the firstname textbox
field in join.aspx
Can you tell me what's wrong???
Sorry, im mixing up with ASP and ASP.NET here....
Thanks for bearing me.

Nov 18 '05 #3
If you want to retrieve information that was submitted in the form from your
new page, you can use standard HTML form tags instead of ASP.NET controls.
You can't post a form to a different page if you use the server-side version
of the <form> tag. So use something like:
<form Method = "Post" Action="results.aspx">
<input name="firstname">

And in results.aspx page, you can do:
three.Text = Request.Params("firstname")
Hope this helps,
Martha
"Eric Shin" <ya***@yaric.com> wrote in message
news:04****************************@phx.gbl...
Hi all.

I'm like really on the beginning stage for ASP.NET
just got a few questions to ask... Please help me.

I've created a form page called "join.aspx"
and it has lots of codes but the important part needed to
be focused on is the following lines.

<asp:textbox id="firstname" runat="server" />

and the form tag says

<form id="Form1" method="get" runat="server"
action="result.aspx">

Also, i have a button component whose code is

<asp:Button ID="submit" Text="Join" Runat="server"
OnClick="join">

where the subroutine, 'join' is

sub join (s as Object, e as EventArgs)
Response.redirect("result.aspx") 'link page
end sub

The result.aspx has only few lines of codes
<script runat="server">
sub Page_Load
three.text = Request.QueryString("firstname")
end sub
</script>
*** AND ***
<asp:Label ID ="three" Runat="server" />

I was just wondering if the id "firstname" is global in
the same project.
FOr this code, i don't get anything in result.aspx when i
actually put some random name in the firstname textbox
field in join.aspx
Can you tell me what's wrong???
Sorry, im mixing up with ASP and ASP.NET here....
Thanks for bearing me.

Nov 18 '05 #4
You have two alternatives to control how a user moves from one page to
another. If you want to retrieve information that was submitted in the form
from your new page, you can use standard HTML form tags instead of ASP.NET
controls. You can't post a form to a different page if you use the
server-side version of the <form> tag. So use something like:
<form Method = "Post" Action="results.aspx">
<input name="firstname">

And in results.aspx page, you can do:
three.Text = Request.Params("firstname")
Hope this helps,
Martha
"Eric Shin" <ya***@yaric.com> wrote in message
news:04****************************@phx.gbl...
Hi all.

I'm like really on the beginning stage for ASP.NET
just got a few questions to ask... Please help me.

I've created a form page called "join.aspx"
and it has lots of codes but the important part needed to
be focused on is the following lines.

<asp:textbox id="firstname" runat="server" />

and the form tag says

<form id="Form1" method="get" runat="server"
action="result.aspx">

Also, i have a button component whose code is

<asp:Button ID="submit" Text="Join" Runat="server"
OnClick="join">

where the subroutine, 'join' is

sub join (s as Object, e as EventArgs)
Response.redirect("result.aspx") 'link page
end sub

The result.aspx has only few lines of codes
<script runat="server">
sub Page_Load
three.text = Request.QueryString("firstname")
end sub
</script>
*** AND ***
<asp:Label ID ="three" Runat="server" />

I was just wondering if the id "firstname" is global in
the same project.
FOr this code, i don't get anything in result.aspx when i
actually put some random name in the firstname textbox
field in join.aspx
Can you tell me what's wrong???
Sorry, im mixing up with ASP and ASP.NET here....
Thanks for bearing me.

Nov 18 '05 #5
If you want to retrieve information that was submitted in the form from your
new page, you can use standard HTML form tags instead of ASP.NET controls.
You CANNOT post a form to a different page if you use the server-side
version of the <form> tag. So use something like:
<form Method = "Post" Action="results.aspx">
<input name="firstname">

And in results.aspx page, you can do:
three.Text = Request.Params("firstname")
Hope this helps,
Martha
"Eric Shin" <ya***@yaric.com> wrote in message
news:04****************************@phx.gbl...
Hi all.

I'm like really on the beginning stage for ASP.NET
just got a few questions to ask... Please help me.

I've created a form page called "join.aspx"
and it has lots of codes but the important part needed to
be focused on is the following lines.

<asp:textbox id="firstname" runat="server" />

and the form tag says

<form id="Form1" method="get" runat="server"
action="result.aspx">

Also, i have a button component whose code is

<asp:Button ID="submit" Text="Join" Runat="server"
OnClick="join">

where the subroutine, 'join' is

sub join (s as Object, e as EventArgs)
Response.redirect("result.aspx") 'link page
end sub

The result.aspx has only few lines of codes
<script runat="server">
sub Page_Load
three.text = Request.QueryString("firstname")
end sub
</script>
*** AND ***
<asp:Label ID ="three" Runat="server" />

I was just wondering if the id "firstname" is global in
the same project.
FOr this code, i don't get anything in result.aspx when i
actually put some random name in the firstname textbox
field in join.aspx
Can you tell me what's wrong???
Sorry, im mixing up with ASP and ASP.NET here....
Thanks for bearing me.

Nov 18 '05 #6

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

Similar topics

2
by: Seth E Seligman | last post by:
I'm working on a web based file manager. The rename file function creates a new window with a form allowing the user to enter a new file name. Before the form gets submitted, I want to make sure that...
13
by: Dan R Brown | last post by:
I have a large form that is generated dynamically in a jsp using xml / xslt. So, to break up this form into several "tabbed" sections, I break up the form using <div> tags. Each <div...
19
by: Pete | last post by:
I have form/select which executes a function using onchange. No problem. However, when I validate the page with a strict HTML 4.01 doctype at http://validator.w3.org, it demands either an action or...
5
by: Richard Cornford | last post by:
I am interested in hearing opinions on the semantic meaning of FORM (elements) in HTML. I have to start of apologising because this question arose in a context that is not applicable to the...
2
by: Tim Mills | last post by:
The following code asks the user to sumbit a name, email address, and some text for a quotation via a FORM. I have written a javascript function to evaluate the fields in the form and pop-up a...
16
by: whyyyy | last post by:
The script below works fine if the form is filled out and submitted. But a (blank) e-mail is sent whenever the page loads, even when the form is not submitted. I would like to receive the e-mail...
4
by: kschneider | last post by:
Assume there's a form with it's action attribute all set to post to a URL, but without a submit control. Form submission is done via a link and I want to prevent the classic "double submit"....
4
by: sameergn | last post by:
Hi, I have an image in my HTML form which has onclick() handler. There is also a submit button and a text box. Whenever text box has focus and user presses enter, the onclick() event of...
5
by: keeps21 | last post by:
A little problem I've run into is the following. I have a script that allows a user to edit a story. I have an HTML form for title and main_text which gets it's values by pulling the selected...
9
by: angi35 | last post by:
Hi - In Access 2000, I'm trying to create a switchboard so users can open a certain form with different filters. I thought I would use an option group with toggle buttons. I suppose it could be...
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: 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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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,...

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.