RE: POST form from HTML to ASP.NET
From: Steven Cheng[MSFT] (v-schang_at_online.microsoft.com)
Date: 03/25/04
- Next message: Ken Schaefer: "Re: Windows Auth -- double hop issue??"
- Previous message: Steve C. Orr [MVP, MCSD]: "Re: POST form from HTML to ASP.NET"
- In reply to: Brian W: "POST form from HTML to ASP.NET"
- Next in thread: Brian W: "Re: POST form from HTML to ASP.NET"
- Reply: Brian W: "Re: POST form from HTML to ASP.NET"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 25 Mar 2004 01:27:49 GMT
Hi Brain,
>From the description, you'd like to have a aspx page be posted to some
other pages by setting
its <form > tag's "action" attribute, yes?
Generally the ASP.NET web page is designed with "post back" model which
make it albe to program as a windows form and it's not recommended to post
the page to another by changing the <form > tag(as what we do in classic
asp) . However, there are still some other means to implement such
functions. We can make the ASP.NET page's
<form > tag as non runat=server so as to make it able to posted to another
page(just as a normal html page). However, using this means will lose the
features of the ASP.NET pages.
In addition to the above means, here are some other approaches:
1. Some some clientside script to change the form's tag's attributes when
the form's submit event is fired. But if the targe page we want to post to
is also an ASP.NET page, we'd consider some issues with the validation and
viewstate checking of the ASP.NET page. Here is a tech article on using
javascript to post a ASP.NET form:
#Post an ASP.NET form with JavaScript
http://www.codeproject.com/aspnet/jsnopostback.asp
2. If the post operation (the datas want to post) can be generate all via
code, you may also consider using the webrequest class to do the post ,
here are some references on using the webrequest class to post to a certain
url:
#Requesting Data
http://msdn.microsoft.com/library/en-us/cpguide/html/cpconrequestingdata.asp
?frame=true
#POSTing Data with ASP.NET
http://authors.aspalliance.com/stevesmith/articles/netscrape2.asp
#How Do I...Make a POST request?
http://samples.gotdotnet.com/quickstart/howto/doc/WebRequests/clientPOST.asp
x
Hope these help.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx
- Next message: Ken Schaefer: "Re: Windows Auth -- double hop issue??"
- Previous message: Steve C. Orr [MVP, MCSD]: "Re: POST form from HTML to ASP.NET"
- In reply to: Brian W: "POST form from HTML to ASP.NET"
- Next in thread: Brian W: "Re: POST form from HTML to ASP.NET"
- Reply: Brian W: "Re: POST form from HTML to ASP.NET"
- Messages sorted by: [ date ] [ thread ]