Solved

submit a form to another web page using ASP.NET

Posted on 2004-04-24
6
8,440 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
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

770 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