Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / November 2003

Tip: Looking for answers? Try searching our database.

Posting ASP .Net web form to another asp page

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Newbie - 17 Nov 2003 23:48 GMT
Hi,

I need help in posting asp .net application web form to another asp based
web app.

I have seen many examples using HttpWebRequest class but the problem is I do
not want the request back but want to post the data to another form so that
at the asp page level we can use request.form values.

Any leads would definately be appreciated.

thanks

Ab
Scott M. - 18 Nov 2003 00:51 GMT
You can't post to a different page in ASP.NET, this is the built-in
architecture.  What you can do is use Server.Transfer(newPage.aspx), which
will transfer control to the new page specified as well as the request
object, so data in the request object will be available on the new page.

> Hi,
>
[quoted text clipped - 10 lines]
>
> Ab
???? - 18 Nov 2003 02:06 GMT
<form id="programmaticID"
     method=POST | GET
     action="srcpageURL"
     runat="server" >
  Other controls, input forms, and so on.
</form>
Signature

????
Rustle Liu

> Hi,
>
[quoted text clipped - 10 lines]
>
> Ab
Scott M. - 18 Nov 2003 02:58 GMT
In .NET you can set the form's action to whatever you like, it won't post to
that page.  Server forms submit to themselves, no matter what.  This is the
fundamental architecture of ASP.NET and the basis for PostBack & ViewState.

> <form id="programmaticID"
>       method=POST | GET
[quoted text clipped - 18 lines]
> >
> > Ab
Bin Song - 26 Nov 2003 20:08 GMT
Just skip the ASP.NET's post-back mechanism.
Using the traditional Querystring way.
On the submit button onclick event, build the querystring
<script language="javascript" for="button1" event="onclick">
{
var strQuery = "targetURL.asp?Field1=" + Field1.value + "&Field2=" + Field2.value;
window.navigate(strQuery);
}
</script>

Bin
MCP

> Hi,
>
[quoted text clipped - 10 lines]
>
> Ab

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.