Solved

submit a form to another web page using ASP.NET

Posted on 2004-04-24
6
8,446 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

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…
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

752 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