473,909 Members | 4,721 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Form Submit

I've set up a page to use to test other pages under development so I can
easily control the parameters that I pass to each of them. I've use the
basic html form structure with a submit button (Code below). When I execute
the submit the browser indicates it's trying to make a connection(page url
not shown) then returns to the original page with no error and no rendering
of the page thats in the action parameter of the form. Any idea what might be
missing or how to get addition information as to what is going on????

Thanks, Neil

..
..
..
<body>
<form id="form1" runat="server" action="~/Home.aspx" method="post">
..
..
..
<input id="Submit1" type="submit" value="Go To Page" /><br />
..
..
</form>
</body>

Jun 27 '08 #1
3 1787
If you've created a form in an .aspx page, then the page will automatically
post to itself, regardless of any action="" that you put into the page
(unless you specifically configure cross-page postbacks).
"Neil B" <Ne***@discussi ons.microsoft.c omwrote in message
news:8A******** *************** ***********@mic rosoft.com...
I've set up a page to use to test other pages under development so I can
easily control the parameters that I pass to each of them. I've use the
basic html form structure with a submit button (Code below). When I
execute
the submit the browser indicates it's trying to make a connection(page url
not shown) then returns to the original page with no error and no
rendering
of the page thats in the action parameter of the form. Any idea what might
be
missing or how to get addition information as to what is going on????

Thanks, Neil

.
.
.
<body>
<form id="form1" runat="server" action="~/Home.aspx" method="post">
.
.
.
<input id="Submit1" type="submit" value="Go To Page" /><br />
.
.
</form>
</body>

Jun 27 '08 #2
Thanks Scott. That explains a few things.
With that in mind how do you control what html is rendered on different post
backs?

The way VS 2008 .aspx is set up the html and c# are kept separately so how
do you control which part of the html you want rendered on each post back.

In .asp using VB the html and the VB code were all editted together and the
VB code could be used to control which html was used.

Since I'm new to VS2008 and C# any prospective on how these elemets are
related would be appreciated. Links to any good discussions on the subject
would be helpful also.

Thanks, Neil

"Scott M." wrote:
If you've created a form in an .aspx page, then the page will automatically
post to itself, regardless of any action="" that you put into the page
(unless you specifically configure cross-page postbacks).
"Neil B" <Ne***@discussi ons.microsoft.c omwrote in message
news:8A******** *************** ***********@mic rosoft.com...
I've set up a page to use to test other pages under development so I can
easily control the parameters that I pass to each of them. I've use the
basic html form structure with a submit button (Code below). When I
execute
the submit the browser indicates it's trying to make a connection(page url
not shown) then returns to the original page with no error and no
rendering
of the page thats in the action parameter of the form. Any idea what might
be
missing or how to get addition information as to what is going on????

Thanks, Neil

.
.
.
<body>
<form id="form1" runat="server" action="~/Home.aspx" method="post">
.
.
.
<input id="Submit1" type="submit" value="Go To Page" /><br />
.
.
</form>
</body>


Jun 27 '08 #3
Hi Neil,

The first thing I would suggest is to NOT assume that ASP .NET is anything
like the old "Classic ASP". While it's true that there are some superficial
similarities, the way the operate is radically different.

In the old days, we'd just slap something like <%=someVariable %inline in
the HTML wherever we wanted values to go. With ASP .NET, you have a wide
assortment of server controls to utilize. So, if you know that you are
going to want a server-derived value to eventually show up in a particular
spot on the rendered page, drop a control in that spot as a sort of "place
holder", give that control a good ID and then in your C# code area, write an
event handler (usually Page_Load or Page_Init) to populate that control.
The simplest example would be to put a label on the page, just where you are
going to want a value to show up. Then in the C#, you reference the label
control very easily by refering to it by it's ID and property:

lblResut.Text = someValue;

In short, it will take you some time to get used to the way ASP .NET works
vs. Classic ASP. A really good site to check out is: http://asp.net.

Good luck!

-Scott
"Neil B" <Ne***@discussi ons.microsoft.c omwrote in message
news:46******** *************** ***********@mic rosoft.com...
Thanks Scott. That explains a few things.
With that in mind how do you control what html is rendered on different
post
backs?

The way VS 2008 .aspx is set up the html and c# are kept separately so how
do you control which part of the html you want rendered on each post back.

In .asp using VB the html and the VB code were all editted together and
the
VB code could be used to control which html was used.

Since I'm new to VS2008 and C# any prospective on how these elemets are
related would be appreciated. Links to any good discussions on the subject
would be helpful also.

Thanks, Neil

"Scott M." wrote:
>If you've created a form in an .aspx page, then the page will
automaticall y
post to itself, regardless of any action="" that you put into the page
(unless you specifically configure cross-page postbacks).
"Neil B" <Ne***@discussi ons.microsoft.c omwrote in message
news:8A******* *************** ************@mi crosoft.com...
I've set up a page to use to test other pages under development so I
can
easily control the parameters that I pass to each of them. I've use
the
basic html form structure with a submit button (Code below). When I
execute
the submit the browser indicates it's trying to make a connection(page
url
not shown) then returns to the original page with no error and no
rendering
of the page thats in the action parameter of the form. Any idea what
might
be
missing or how to get addition information as to what is going on????

Thanks, Neil

.
.
.
<body>
<form id="form1" runat="server" action="~/Home.aspx" method="post">
.
.
.
<input id="Submit1" type="submit" value="Go To Page" /><br
/>
.
.
</form>
</body>



Jun 27 '08 #4

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

Similar topics

1
5761
by: monika | last post by:
hi ... I have an asp page which has 3 buttons. <p align="center"><input class="button" type="button" onClick="location='welStudent.asp';" value="Click to write a new story"></p> <p align="center"><input class="button" type="button" onClick="location='draftedStory.asp';" value="Click to complete the drafted story"></p> <p align="center"> <input class="button" type="submit" value="Click to view your grade sheet" name="submit"> </p>
2
5555
by: Matt | last post by:
Can form.submit() submit another form? In the following example, in page1.asp, it is fine to submit the current form: form1.submit(), and and I could see the value "Joe" in page2.asp. However, if I do: form3.submit(), then it couldn't go to page2.asp. Any ideas?? Thanks!! //page1.asp <html> <head> </head> <body onload="form1.submit()"> //OK!
2
73390
by: Terence Parker | last post by:
How does one go about submitting a form with a link - but submitting it to a new window AND to a page different to that described within the action="" option of the <form> tag? Say, for example, I have a simple form such as the following: <form method="POST" action="submit.php" name="AForm"> Name: <input type="text" name="Name" length="20"><br> Age: 15 <a href="age.php">change age</a><br> <input type="submit" name="submit"...
4
7800
by: Sarah | last post by:
Hi all. I have a form, and several text and image links on it that should submit the form with different actions. I prepared a simple page with just the code that's not working. PROBLEM: The form won't submit if the link is clicked, but will submit if the SUBMIT button is clicked. I need to call a function to change the form's action according to user's input before it is submitted.
15
6594
by: M Smith | last post by:
I have a form I want to submit to itself. I want to be able to type in a list of numbers and submit the form and have that list show up on the same form under the text box I typed them into and the buttons. The problem is when I post a form to itself, the Enter key will not submit the form, it only clears the contents of the text box. The only way I can submit is to click the submit button. Here is a simplified version of my code that I...
6
3116
by: CJM | last post by:
Can somebody clarify if/how/when a simple form is submitted when the <Enter> key is pressed? As I understood it, if you have a form with a single submit button, if enter is pressed, the form should be submitted as if the button is pressed. Is this correct? Does this behaviour vary across browsers? Chris
4
9310
by: Stuart Perryman | last post by:
Hi, I have the following code which works just fine in IE6 but not in Firefox. It is an extract of several table rows each with an individual form. It is generated by php. <form action="MaintNotification.php?ReqID=5" method="post" name="frm5"> <tr align="left" bgcolor="#dddddd" class="text" onClick="submit()"
5
8460
by: rjames.clarke | last post by:
I have the following. $result=mysql_query($sql); $nrows=mysql_num_rows($result); for ($i=0;$i<$nrows;$i++) { $row_array=mysql_fetch_row($result); echo "<form name='testform' action='ins_op.php' method='post'>"; lots of form stuff
5
17722
by: Navillus | last post by:
Hey gang, I have a login form that is empty by default, but can be filled with values from a previous form: <input type=text maxlength="40" size="40" name="user" value="`usr`"> <input type=password maxlength="8" name="password" value="`pss`"> where usr and pss are sent from the previous form.
1
10845
by: gbezas | last post by:
Hi All, I have added an event handler to redirect form.submit() to a newSubmit() method that I have defined (which does some additional processing before submitting the form). Additionally I have defined the relavant function method in the code for details) The issue is that when Icall targetForm._submit() method from the newSubmit() function the page I get an 'Object doesn't support this property or method' error I am using IE...
0
10035
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
11346
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...
0
9725
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...
1
8097
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7248
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5938
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...
0
6138
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4774
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
4336
muto222
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.