Solved

submit a form to another web page using ASP.NET

Posted on 2004-04-24
6
8,442 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
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
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…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

856 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