473,812 Members | 3,551 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.redire ct("result.aspx ") 'link page
end sub

The result.aspx has only few lines of codes
<script runat="server">
sub Page_Load
three.text = Request.QuerySt ring("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 1162
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.redire ct("result.aspx ?firstname=" &
Server.URLEncod e(firstname.tex t)) '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.redire ct("result.aspx ") 'link page
end sub

The result.aspx has only few lines of codes
<script runat="server">
sub Page_Load
three.text = Request.QuerySt ring("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="whereve r 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.co m> 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.redire ct("result.aspx ") 'link page
end sub

The result.aspx has only few lines of codes
<script runat="server">
sub Page_Load
three.text = Request.QuerySt ring("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.co m> 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.redire ct("result.aspx ") 'link page
end sub

The result.aspx has only few lines of codes
<script runat="server">
sub Page_Load
three.text = Request.QuerySt ring("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.co m> 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.redire ct("result.aspx ") 'link page
end sub

The result.aspx has only few lines of codes
<script runat="server">
sub Page_Load
three.text = Request.QuerySt ring("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.co m> 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.redire ct("result.aspx ") 'link page
end sub

The result.aspx has only few lines of codes
<script runat="server">
sub Page_Load
three.text = Request.QuerySt ring("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
33816
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 a valid file name (no "/" or "\" characters) was entered. If the validation functions returns true, the form should be submitted and the window closed. If the function returns false the form window should stay open so the use can enter a new file...
13
40778
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 style="display:none"> can be displayed by setting the style attribute to "display:", or hidden with "display:none". This gives the illusion that the person filling out the form is switching from page to page...without the overhead of extra hits on the server,...
19
3007
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 a method for the form?. If I give it an empty action <form action="" ..... it validates OK. Is this acceptable or is there a better/standards correct way? Thanks.
5
6097
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 Internet. Specifically, marking up a document that will contain multiple related form controls (intended exclusively for client-side scripting) that would never be intended to be submitted. I realise that that concept is a non-starter in an Internet...
2
2368
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 message to tell the user if all the fields have been fill-out. If the user has missed some information the form re-displays with red "alerts" indicating where the user have missed the information while re-populating the information the user has...
16
3154
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 only when the form is submitted <%@LANGUAGE="VBSCRIPT"%> <% Set MyMail=CreateObject("CDO.Message")
4
2739
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". Ignoring the server side of things, does anyone see any holes with the following script? It seems to work, but I'd appreciate other eyes on it. Maybe a try/catch/finally wrapper of some sort to be sure the link is re-enabled in the face of an...
4
13572
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 image is fired with event.keyCode as undefined. I was expecting that the form would get submitted. I tried returning from onclick() handler if keyCode is null, but the
5
2483
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 data from the database. If the user either i) doesn't change anything, and then saves. or
9
2323
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 just a series of command buttons instead. Either way, I can't figure out the code to get Access to both open a form and filter it at the same time. Part of my trouble is also that the terms I need to filter on are multiple words, and I'm really...
0
9734
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9607
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10664
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10417
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9220
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5568
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4357
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3881
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3029
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.