473,545 Members | 1,471 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

html forms in aspx pages

I can't seem to get my html form to submit properly from within a web form.
Here's my form tag syntax and some delivery hidden fields.
<form id="myForm" action="https://xxx.order.net/xxx/cgi-bin/delivery.cgi"
method="POST" onsubmit="retur n verify();">
<input type="hidden" name="recipient " va******@mymail .net />
<input type="hidden" name="redirect"
value="http://www.xxx.org/forms/confirmation.ht m" />
............... .....
............... .....
rest of form.

I have the form within <asp:contenttag s of an asp web form page. Is that
the problem? Do html forms need to be in a file with an html extension and
not a web form. This web form uses a masterpage. I did try putting the html
forms in the masterpage -- but that didn't seem to affect anything.

The form recognizes the reset button and clears the form, but when I submit
it simply reloads the page -- and doesn't access the delivery.cgi file nor
send me the results nor redirect to the confirmation page.

Thanks for any help.




Jan 17 '07 #1
7 2780
When you say you can't get it to submit properly - what exactly do you mean
(what happens)?

I've never tried the 'old' way of doing forms in a content page, so I'm not
exactly sure what to expect - but I'd suggest writing it the ASP.Net way,
instead - I do that all the time and it works fine....

--
David Wier
MVP/ASPInsider
http://aspnet101.com
http://aspexpress.com
"thersitz" <th******@gmail .comwrote in message
news:ei******** ******@TK2MSFTN GP02.phx.gbl...
I can't seem to get my html form to submit properly from within a web
form.
Here's my form tag syntax and some delivery hidden fields.
<form id="myForm" action="https://xxx.order.net/xxx/cgi-bin/delivery.cgi"
method="POST" onsubmit="retur n verify();">
<input type="hidden" name="recipient " va******@mymail .net />
<input type="hidden" name="redirect"
value="http://www.xxx.org/forms/confirmation.ht m" />
............... ....
............... ....
rest of form.

I have the form within <asp:contenttag s of an asp web form page. Is that
the problem? Do html forms need to be in a file with an html extension and
not a web form. This web form uses a masterpage. I did try putting the
html
forms in the masterpage -- but that didn't seem to affect anything.

The form recognizes the reset button and clears the form, but when I
submit
it simply reloads the page -- and doesn't access the delivery.cgi file nor
send me the results nor redirect to the confirmation page.

Thanks for any help.




Jan 17 '07 #2
You can't nest HTML forms inside each other.

--
HTH,

Kevin Spencer
Microsoft MVP
Bit Player
http://unclechutney.blogspot.com

In case of Minimalism, break Philip Glass.

"thersitz" <th******@gmail .comwrote in message
news:ei******** ******@TK2MSFTN GP02.phx.gbl...
>I can't seem to get my html form to submit properly from within a web form.
Here's my form tag syntax and some delivery hidden fields.
<form id="myForm" action="https://xxx.order.net/xxx/cgi-bin/delivery.cgi"
method="POST" onsubmit="retur n verify();">
<input type="hidden" name="recipient " va******@mymail .net />
<input type="hidden" name="redirect"
value="http://www.xxx.org/forms/confirmation.ht m" />
............... ....
............... ....
rest of form.

I have the form within <asp:contenttag s of an asp web form page. Is that
the problem? Do html forms need to be in a file with an html extension and
not a web form. This web form uses a masterpage. I did try putting the
html forms in the masterpage -- but that didn't seem to affect anything.

The form recognizes the reset button and clears the form, but when I
submit it simply reloads the page -- and doesn't access the delivery.cgi
file nor send me the results nor redirect to the confirmation page.

Thanks for any help.




Jan 17 '07 #3
Thanks David. I am really new to asp.net, and feel I am drowning.

Well, my action attribute is suppose to go to this
<action="http s://xxx.order.net/xxx/cgi-bin/delivery.cgi"cg i file and get
read and then delivered and then send the user to a confirmation page. All
that happens in my aspx file is that the page reloads and nothing seems to
get sent anywhere.

I tried using the asp.net controls to build the form -- and still use the
delivery.cgi to parse it -- but then I was getting post back errors.

If I build the form using all asp.net controls -- and not use any regular
html form tags -- how do I get it to deliver say an email to a set of
recipients?

I appropriately have an asp for dummies book and it seems to suggest just
using html form tags -- and when doing so, the page builds fine and displays
fine. The reset button clears the form. But submitting just reloads the very
same page instead of routing to the cgi file handler.

"David Wier" <da********@noS pamhotmail.comw rote in message
news:uz******** ********@TK2MSF TNGP02.phx.gbl. ..
When you say you can't get it to submit properly - what exactly do you
mean
(what happens)?

I've never tried the 'old' way of doing forms in a content page, so I'm
not
exactly sure what to expect - but I'd suggest writing it the ASP.Net way,
instead - I do that all the time and it works fine....

--
David Wier
MVP/ASPInsider
http://aspnet101.com
http://aspexpress.com
"thersitz" <th******@gmail .comwrote in message
news:ei******** ******@TK2MSFTN GP02.phx.gbl...
>I can't seem to get my html form to submit properly from within a web
form.
>Here's my form tag syntax and some delivery hidden fields.
<form id="myForm" action="https://xxx.order.net/xxx/cgi-bin/delivery.cgi"
method="POST " onsubmit="retur n verify();">
<input type="hidden" name="recipient " va******@mymail .net />
<input type="hidden" name="redirect"
value="http://www.xxx.org/forms/confirmation.ht m" />
.............. .....
.............. .....
rest of form.

I have the form within <asp:contenttag s of an asp web form page. Is
that
the problem? Do html forms need to be in a file with an html extension
and
not a web form. This web form uses a masterpage. I did try putting the
html
>forms in the masterpage -- but that didn't seem to affect anything.

The form recognizes the reset button and clears the form, but when I
submit
>it simply reloads the page -- and doesn't access the delivery.cgi file
nor
send me the results nor redirect to the confirmation page.

Thanks for any help.





Jan 17 '07 #4
The problem here, is the form deal, as Kevin pointed out - - - (doah! -
wasn't thinking clearly enough)
The way this is normally done is creating the form itself (without the form
tags), and then adding a button. Then, inside the button's click event, you
create everything that you need done with the form.
Not totally sure, again, with the cgi aspect of this - but check out this
sample on crosspage posting and see if you can get it started that way:
http://quickstarts.asp.net/QuickStar...aspx#crosspage

--
David Wier
MVP/ASPInsider
http://aspnet101.com
http://aspexpress.com

"thersitz" <th******@gmail .comwrote in message
news:uV******** ******@TK2MSFTN GP06.phx.gbl...
Thanks David. I am really new to asp.net, and feel I am drowning.

Well, my action attribute is suppose to go to this
<action="http s://xxx.order.net/xxx/cgi-bin/delivery.cgi"cg i file and get
read and then delivered and then send the user to a confirmation page. All
that happens in my aspx file is that the page reloads and nothing seems to
get sent anywhere.

I tried using the asp.net controls to build the form -- and still use the
delivery.cgi to parse it -- but then I was getting post back errors.

If I build the form using all asp.net controls -- and not use any regular
html form tags -- how do I get it to deliver say an email to a set of
recipients?

I appropriately have an asp for dummies book and it seems to suggest just
using html form tags -- and when doing so, the page builds fine and
displays
fine. The reset button clears the form. But submitting just reloads the
very
same page instead of routing to the cgi file handler.

"David Wier" <da********@noS pamhotmail.comw rote in message
news:uz******** ********@TK2MSF TNGP02.phx.gbl. ..
When you say you can't get it to submit properly - what exactly do you
mean
(what happens)?

I've never tried the 'old' way of doing forms in a content page, so I'm
not
exactly sure what to expect - but I'd suggest writing it the ASP.Net
way,
instead - I do that all the time and it works fine....

--
David Wier
MVP/ASPInsider
http://aspnet101.com
http://aspexpress.com
"thersitz" <th******@gmail .comwrote in message
news:ei******** ******@TK2MSFTN GP02.phx.gbl...
I can't seem to get my html form to submit properly from within a web
form.
Here's my form tag syntax and some delivery hidden fields.
<form id="myForm"
action="https://xxx.order.net/xxx/cgi-bin/delivery.cgi"
method="POST" onsubmit="retur n verify();">
<input type="hidden" name="recipient " va******@mymail .net />
<input type="hidden" name="redirect"
value="http://www.xxx.org/forms/confirmation.ht m" />
............... ....
............... ....
rest of form.

I have the form within <asp:contenttag s of an asp web form page. Is
that
the problem? Do html forms need to be in a file with an html extension
and
not a web form. This web form uses a masterpage. I did try putting the
html
forms in the masterpage -- but that didn't seem to affect anything.

The form recognizes the reset button and clears the form, but when I
submit
it simply reloads the page -- and doesn't access the delivery.cgi file
nor
send me the results nor redirect to the confirmation page.

Thanks for any help.





Jan 17 '07 #5
Yes it does. Thanks, Kevin.

Could I do this in my masterpage:
<form id="form1" runat="server"
action="https://xxx.order.net/xxx/cgi-bin/delivery.cgi">

And then build a web form linking that masterpage and when submitting have
the server send the results to the cgi file cited so that the cgi file
parses and delivers -- like my other html forms?
"Kevin Spencer" <un**********@n othinks.comwrot e in message
news:Oy******** ******@TK2MSFTN GP04.phx.gbl...
You can't nest HTML forms inside each other.

--
HTH,

Kevin Spencer
Microsoft MVP
Bit Player
http://unclechutney.blogspot.com

In case of Minimalism, break Philip Glass.

"thersitz" <th******@gmail .comwrote in message
news:ei******** ******@TK2MSFTN GP02.phx.gbl...
>>I can't seem to get my html form to submit properly from within a web
form. Here's my form tag syntax and some delivery hidden fields.
<form id="myForm" action="https://xxx.order.net/xxx/cgi-bin/delivery.cgi"
method="POST " onsubmit="retur n verify();">
<input type="hidden" name="recipient " va******@mymail .net />
<input type="hidden" name="redirect"
value="http://www.xxx.org/forms/confirmation.ht m" />
.............. .....
.............. .....
rest of form.

I have the form within <asp:contenttag s of an asp web form page. Is
that the problem? Do html forms need to be in a file with an html
extension and not a web form. This web form uses a masterpage. I did try
putting the html forms in the masterpage -- but that didn't seem to
affect anything.

The form recognizes the reset button and clears the form, but when I
submit it simply reloads the page -- and doesn't access the delivery.cgi
file nor send me the results nor redirect to the confirmation page.

Thanks for any help.





Jan 17 '07 #6
Another method is to put the "regular" HTML form outside the WebForm
(outside of the <form...>...</formtags) in the ASP.Net page. Of course,
you would have to change your method of adding the "plain HTML" form code, a
server-side include, for example.

--
HTH,

Kevin Spencer
Microsoft MVP
Bit Player
http://unclechutney.blogspot.com

In case of Minimalism, break Philip Glass.

"David Wier" <da********@noS pamhotmail.comw rote in message
news:e7******** *****@TK2MSFTNG P04.phx.gbl...
The problem here, is the form deal, as Kevin pointed out - - - (doah! -
wasn't thinking clearly enough)
The way this is normally done is creating the form itself (without the
form
tags), and then adding a button. Then, inside the button's click event,
you
create everything that you need done with the form.
Not totally sure, again, with the cgi aspect of this - but check out this
sample on crosspage posting and see if you can get it started that way:
http://quickstarts.asp.net/QuickStar...aspx#crosspage

--
David Wier
MVP/ASPInsider
http://aspnet101.com
http://aspexpress.com

"thersitz" <th******@gmail .comwrote in message
news:uV******** ******@TK2MSFTN GP06.phx.gbl...
>Thanks David. I am really new to asp.net, and feel I am drowning.

Well, my action attribute is suppose to go to this
<action="https ://xxx.order.net/xxx/cgi-bin/delivery.cgi"cg i file and
get
read and then delivered and then send the user to a confirmation page.
All
that happens in my aspx file is that the page reloads and nothing seems
to
get sent anywhere.

I tried using the asp.net controls to build the form -- and still use the
delivery.cgi to parse it -- but then I was getting post back errors.

If I build the form using all asp.net controls -- and not use any
regular
html form tags -- how do I get it to deliver say an email to a set of
recipients?

I appropriately have an asp for dummies book and it seems to suggest just
using html form tags -- and when doing so, the page builds fine and
displays
>fine. The reset button clears the form. But submitting just reloads the
very
>same page instead of routing to the cgi file handler.

"David Wier" <da********@noS pamhotmail.comw rote in message
news:uz******* *********@TK2MS FTNGP02.phx.gbl ...
When you say you can't get it to submit properly - what exactly do you
mean
(what happens)?

I've never tried the 'old' way of doing forms in a content page, so I'm
not
exactly sure what to expect - but I'd suggest writing it the ASP.Net
way,
instead - I do that all the time and it works fine....

--
David Wier
MVP/ASPInsider
http://aspnet101.com
http://aspexpress.com
"thersitz" <th******@gmail .comwrote in message
news:ei******** ******@TK2MSFTN GP02.phx.gbl...
I can't seem to get my html form to submit properly from within a web
form.
Here's my form tag syntax and some delivery hidden fields.
<form id="myForm"
action="https://xxx.order.net/xxx/cgi-bin/delivery.cgi"
>method="POST " onsubmit="retur n verify();">
<input type="hidden" name="recipient " va******@mymail .net />
<input type="hidden" name="redirect"
value="http://www.xxx.org/forms/confirmation.ht m" />
.............. .....
.............. .....
rest of form.

I have the form within <asp:contenttag s of an asp web form page. Is
that
the problem? Do html forms need to be in a file with an html extension
and
not a web form. This web form uses a masterpage. I did try putting the
html
forms in the masterpage -- but that didn't seem to affect anything.

The form recognizes the reset button and clears the form, but when I
submit
it simply reloads the page -- and doesn't access the delivery.cgi file
nor
send me the results nor redirect to the confirmation page.

Thanks for any help.






Jan 18 '07 #7
I just gave you a suggestion in another post in this same thread. See if you
like it. The important thing to remember is that a WebForm is, on the client
side, an HTML form, and you can't nest HTML forms inside one another. How
you work around that is up to you, but I did make a suggestion.

--
HTH,

Kevin Spencer
Microsoft MVP
Bit Player
http://unclechutney.blogspot.com

In case of Minimalism, break Philip Glass.

"thersitz" <th******@gmail .comwrote in message
news:uC******** ******@TK2MSFTN GP04.phx.gbl...
Yes it does. Thanks, Kevin.

Could I do this in my masterpage:
<form id="form1" runat="server"
action="https://xxx.order.net/xxx/cgi-bin/delivery.cgi">

And then build a web form linking that masterpage and when submitting have
the server send the results to the cgi file cited so that the cgi file
parses and delivers -- like my other html forms?
"Kevin Spencer" <un**********@n othinks.comwrot e in message
news:Oy******** ******@TK2MSFTN GP04.phx.gbl...
>You can't nest HTML forms inside each other.

--
HTH,

Kevin Spencer
Microsoft MVP
Bit Player
http://unclechutney.blogspot.com

In case of Minimalism, break Philip Glass.

"thersitz" <th******@gmail .comwrote in message
news:ei******* *******@TK2MSFT NGP02.phx.gbl.. .
>>>I can't seem to get my html form to submit properly from within a web
form. Here's my form tag syntax and some delivery hidden fields.
<form id="myForm"
action="https ://xxx.order.net/xxx/cgi-bin/delivery.cgi" method="POST"
onsubmit="ret urn verify();">
<input type="hidden" name="recipient " va******@mymail .net />
<input type="hidden" name="redirect"
value="http ://www.xxx.org/forms/confirmation.ht m" />
............. ......
............. ......
rest of form.

I have the form within <asp:contenttag s of an asp web form page. Is
that the problem? Do html forms need to be in a file with an html
extension and not a web form. This web form uses a masterpage. I did try
putting the html forms in the masterpage -- but that didn't seem to
affect anything.

The form recognizes the reset button and clears the form, but when I
submit it simply reloads the page -- and doesn't access the delivery.cgi
file nor send me the results nor redirect to the confirmation page.

Thanks for any help.






Jan 18 '07 #8

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

Similar topics

0
1548
by: unclehughie | last post by:
I have a number of working ASP pages that use HTML forms to obtain and display data from a remote source. A current example would be the stock quote interactive component in FrontPage 2003 that queries msn money for a current stock price and displays it in the browser. I know I can run ASP pages side by side with aspx pages, but my problem is...
1
2499
by: MJ | last post by:
I'm building an application that has a file structure similar to the following: /myapp/user_login.aspx /myapp/user_page_1.aspx /myapp/user_page_2.aspx /myapp/user_page_3.aspx /myapp/admin/admin_login.aspx /myapp/admin/admin_page_1.aspx /myapp/admin/admin_page_2.aspx
2
8376
by: Hazzard | last post by:
I just realized that the code I inherited is using all asp.net server controls (ie. webform controls) and when I try to update textboxes on the client side, I lose the new value of the textbox when submitting the form to update the database. The server doesn't have the client side value any more. It seems to me that as I begin to write the...
12
1719
by: SStory | last post by:
Doing pages for contract..... If I make an ASPX file that does certain things, how simple would it be for a person who know nothing about it to modify the user interface without bothering the ASPX interaction? How would I best build such pages. Many people of course don't want a page that they can't modify at all without programmer...
11
2847
by: tma | last post by:
I have the following HTML in use on my web page. I need it to show a graphic image on the page but do not know what to use in the codebehind to make the graphic appear. If I load the source url in a browser by itself, the graphic appears, but when I use the tag in a web page it does not. Anyone have a suggestion for VB? <img...
6
2857
by: William F. Zachmann | last post by:
We've got a project going that involves moving an old web site with a massive dll written in C++ that produces most of the output from a SQL 7.0 data base on NT4 onto IIS on Windows 2003 Server with SQL 2000. All new code is being written in C# using ASP.NET and we are using forms authentication to control access to particular...
1
1903
by: Arun | last post by:
I have a folder “Secured” under the root folder of the project In the project root web.config authentication is given as <authentication mode="Forms"> <forms loginUrl="Login.aspx" timeout="15" /> </authentication> In the “Secured” folder web.config is coded as <?xml version="1.0" encoding="utf-8"?> <configuration...
5
2791
by: nick | last post by:
I need to create a simple asp.net application that use password protect some html pages. The html page provider doesn't know asp.net. And the host doesn't allow me to create user accounts. What's the best way to store users/password except database tables? and to store html files?
2
3071
by: nick | last post by:
I have an Asp.Net 2.0 application using form authentication. I want the html pages be protected by the authentication system too. The accessing of html files need to be authenticated in my local system. However, it doesn't after I uploaded the files to my web host site. Any setting to modify to make my hosting html files need to be...
0
7656
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. ...
0
7805
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...
1
7416
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...
0
7752
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...
0
5969
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 projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5325
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...
0
4944
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...
1
1013
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
701
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...

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.