Ask a Question related to ASP.NET General, Design and Development.
-
Ben Turner #1
How to include multiple <forms> on one ASP.NET page
Hi,
I need to create an ASPX page that includes both traditional HTML Forms
(which are submitted to a third-party site like a travel booking service)
and also make use of the ASP.Net form. I've tried a number of approaches so
far but none seem to really suffice:
1. Position the HTML form elements absolutely and simply write the HTML
after the </form> tag. This sort of works but then allows no server control
over the creation of the form (i.e. setting the check-in date as today + 7)
as all of the elements lack the 'runat=server' parameter.
2. Make the HTML form submit to my IIS server and then simply prepare
redirect to a URL with all of the form elements included (i.e. mimic a
method=get form). This works (in some cases) but creates the most hideous
URL's (and obviously is limited in length etc. etc. etc.)
3. Submit the HTML form to my IIS server and then construct a POST query by
hand. I'm not even sure if this is allowed, and seems like a nasty approach
as it will involve unnecessary extra visits to my server.
What I'd really like to do is have the secondary form as a custom Web
Control so that it can be prepared at the server, customised according to
dates etc. and then served to whichever page needs it. When the user clicks
'submit' it would (preferably) submit directly to the third-party site.
Does anyone have any ideas?
Thanks in advance!
Ben.
mailto:ben@guidetotheworld.net
Ben Turner Guest
-
How do I Include content (another page) in a WEeb [page
I need some help. I?ve been using MS Front Page for the last 6-7 yrs. In MS FP there is a way to include an html file into another html file. ... -
Multiple Forms in one page
Is there any way to have multiple forms in one page without having the forced space between the submit buttons that each form has? In other... -
Multiple forms on one page
I am trying to put together a stripped-down online order form that allows a user to enter quantities ordered for a bunch of products, as well as... -
Every time i try to display records on an include page i get repeats of the whole include
hi guys and ladies, here is my problem and i would be most grateful if any one could shed some light on this please: i have a default.asp page... -
[PHP] multiple FORMS on same page problem.
I am creating a page with 2 buttons. One which will refresh the page and the other that will go to another page. My problem that I need to put all... -
Ram #2
Re: How to include multiple <forms> on one ASP.NET page
If you are submitting the form using a button named Button1, you can
add the following code to Page Load event to submit your form directly
to Hotmail site.
Button1.Attributes.Add("onClick",
"Form1.action='http://www.hotmail.com';Form1.Submit;")
You don't need to create a custom control to submit a server form to a
third party site.
Thanks
Ram
"Ben Turner" <ben@guidetotheworld.net> wrote in message news:<Tu2Wa.2272$bo1.1409@news-server.bigpond.net.au>...> Hi,
>
> I need to create an ASPX page that includes both traditional HTML Forms
> (which are submitted to a third-party site like a travel booking service)
> and also make use of the ASP.Net form. I've tried a number of approaches so
> far but none seem to really suffice:
>
> 1. Position the HTML form elements absolutely and simply write the HTML
> after the </form> tag. This sort of works but then allows no server control
> over the creation of the form (i.e. setting the check-in date as today + 7)
> as all of the elements lack the 'runat=server' parameter.
>
> 2. Make the HTML form submit to my IIS server and then simply prepare
> redirect to a URL with all of the form elements included (i.e. mimic a
> method=get form). This works (in some cases) but creates the most hideous
> URL's (and obviously is limited in length etc. etc. etc.)
>
> 3. Submit the HTML form to my IIS server and then construct a POST query by
> hand. I'm not even sure if this is allowed, and seems like a nasty approach
> as it will involve unnecessary extra visits to my server.
>
> What I'd really like to do is have the secondary form as a custom Web
> Control so that it can be prepared at the server, customised according to
> dates etc. and then served to whichever page needs it. When the user clicks
> 'submit' it would (preferably) submit directly to the third-party site.
>
> Does anyone have any ideas?
>
> Thanks in advance!
>
> Ben.
>
> mailto:ben@guidetotheworld.netRam Guest
-
Saravana #3
Re: How to include multiple <forms> on one ASP.NET page
You can check out this article, it might help you
[url]http://msdn.microsoft.com/msdnmag/issues/03/05/CuttingEdge/[/url]
--
Saravana
Microsoft India Community Star,MC**
[url]www.ExtremeExperts.com[/url]
"Ben Turner" <ben@guidetotheworld.net> wrote in message
news:Tu2Wa.2272$bo1.1409@news-server.bigpond.net.au...so> Hi,
>
> I need to create an ASPX page that includes both traditional HTML Forms
> (which are submitted to a third-party site like a travel booking service)
> and also make use of the ASP.Net form. I've tried a number of approachescontrol> far but none seem to really suffice:
>
> 1. Position the HTML form elements absolutely and simply write the HTML
> after the </form> tag. This sort of works but then allows no server7)> over the creation of the form (i.e. setting the check-in date as today +by> as all of the elements lack the 'runat=server' parameter.
>
> 2. Make the HTML form submit to my IIS server and then simply prepare
> redirect to a URL with all of the form elements included (i.e. mimic a
> method=get form). This works (in some cases) but creates the most hideous
> URL's (and obviously is limited in length etc. etc. etc.)
>
> 3. Submit the HTML form to my IIS server and then construct a POST queryapproach> hand. I'm not even sure if this is allowed, and seems like a nastyclicks> as it will involve unnecessary extra visits to my server.
>
> What I'd really like to do is have the secondary form as a custom Web
> Control so that it can be prepared at the server, customised according to
> dates etc. and then served to whichever page needs it. When the user> 'submit' it would (preferably) submit directly to the third-party site.
>
> Does anyone have any ideas?
>
> Thanks in advance!
>
> Ben.
>
> mailto:ben@guidetotheworld.net
>
>
Saravana Guest



Reply With Quote

