473,700 Members | 2,699 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 1782
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
5749
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
5548
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
73374
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
7790
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
6572
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
3100
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
9297
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
8446
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
17708
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
10818
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
8722
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
9210
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
9069
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8922
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7805
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
6558
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
5900
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();...
1
3086
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
3
2025
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.