Solved

submit a form to another web page using ASP.NET

Posted on 2004-04-24
6
8,433 Views
Last Modified: 2007-12-19
Hello every body..
I am learning ASP.NET these days..
when I was reading ASP.NET I noted that all examples submit a postback form.. I want to know how can I submit a form to another web page?
and Thanks in advance...
(Hassan Ghanem)
0
Comment
Question by:Hassan_Ghanem
6 Comments
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 10909543
Hassan,

I have moved this to the ASP.NET topic area where I think you will have a better chance of getting a solution.

COBOLdinosaur
Page Editor, Web Development
0
 
LVL 12

Expert Comment

by:dfiala13
ID: 10910281
Theoretically, yes.  Though ASP.NET is really designed to post back.   When you post to another page you lose a lot of the power of the ASP.NET development model including the ability to easily refer to controls on the page as objects.

This is definitely a change from the classic ASP model, but you'll probably find development in ASP.NET easier if you follow the post back model.  If you need to move to another page on a submit, you can use Server.Transfer or Response.Redirect to move to the proper page.
0
 
LVL 28

Expert Comment

by:mmarinov
ID: 10910749
If you use Server.Transfer you "redirect" the Request Collection to the new page and ends the execution of current page
The Response.Redirect works like in the pure ASP so it just redirect you nothing else

B..M
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 30

Expert Comment

by:SteveGTR
ID: 10910771
Check out:

http://www.codeproject.com/aspnet/CHtmlForm.asp

Very cool method of providing an action attribute that posts to another site.

Good Luck,
Steve
0
 
LVL 23

Expert Comment

by:rama_krishna580
ID: 10911273
0
 
LVL 20

Accepted Solution

by:
ihenry earned 250 total points
ID: 10911435
While a classic ASP page has multiple forms model that allow you to POST HTTP method to another page, ASP.NET by default has only a single form model that post to itself. But ASP.NET provides a variety of ways to navigate between web forms with just a single form, follow this link for more info:

Managing ASP.NET Navigation
http://www.ondotnet.com/pub/a/dotnet/2003/04/07/aspnetnav.html?page=1
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now