473,320 Members | 1,940 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

How to handle cross-page posting problem?

Hello, friends,

I tried to do cross-page posting, i.e., in firstpage.aspx I used
action="secondpage.aspx".

Since I am using asp.net 1.1, so it always goes back to firstpage.aspx
aftern submitting firstpage.aspx.

I then tried in page_load of firstpage.aspx:

if (this.IsPostBack)
{
Server.Transfer("secondpage.aspx");
}

It did go to secondpage.aspx, but all submitted info were lost and could not
be seen in secondpage.aspx.

Any sample source code, reference papers? Help please...
Dec 5 '05 #1
6 1508
Hi Andrew,
In asp.net 1.1, we can do cross posting by omitting the runat="server"
attribute in the form tag.But the drawback here is uve to use HTML controls
instead of server controls..
See the below article for more info
http://www.c-sharpcorner.com/Code/20...ostingData.asp

If u want to use server controls ,then u can persist values in another page
by using session,querystring.

"Andrew" wrote:
Hello, friends,

I tried to do cross-page posting, i.e., in firstpage.aspx I used
action="secondpage.aspx".

Since I am using asp.net 1.1, so it always goes back to firstpage.aspx
aftern submitting firstpage.aspx.

I then tried in page_load of firstpage.aspx:

if (this.IsPostBack)
{
Server.Transfer("secondpage.aspx");
}

It did go to secondpage.aspx, but all submitted info were lost and could not
be seen in secondpage.aspx.

Any sample source code, reference papers? Help please...

Dec 5 '05 #2
when you transfer, you can access the previous page (Context.Handler).
expose the fields you need to access as global properties, then you can
access them, after you cast hander as the page type.

-- bruce (sqlwork.com)

"Andrew" <An****@discussions.microsoft.com> wrote in message
news:A4**********************************@microsof t.com...
Hello, friends,

I tried to do cross-page posting, i.e., in firstpage.aspx I used
action="secondpage.aspx".

Since I am using asp.net 1.1, so it always goes back to firstpage.aspx
aftern submitting firstpage.aspx.

I then tried in page_load of firstpage.aspx:

if (this.IsPostBack)
{
Server.Transfer("secondpage.aspx");
}

It did go to secondpage.aspx, but all submitted info were lost and could
not
be seen in secondpage.aspx.

Any sample source code, reference papers? Help please...

Dec 5 '05 #3
thanks, but that page is no longer there.

any other reference paper?

"Santhi Maadhaven" wrote:
Hi Andrew,
In asp.net 1.1, we can do cross posting by omitting the runat="server"
attribute in the form tag.But the drawback here is uve to use HTML controls
instead of server controls..
See the below article for more info
http://www.c-sharpcorner.com/Code/20...ostingData.asp

If u want to use server controls ,then u can persist values in another page
by using session,querystring.

"Andrew" wrote:
Hello, friends,

I tried to do cross-page posting, i.e., in firstpage.aspx I used
action="secondpage.aspx".

Since I am using asp.net 1.1, so it always goes back to firstpage.aspx
aftern submitting firstpage.aspx.

I then tried in page_load of firstpage.aspx:

if (this.IsPostBack)
{
Server.Transfer("secondpage.aspx");
}

It did go to secondpage.aspx, but all submitted info were lost and could not
be seen in secondpage.aspx.

Any sample source code, reference papers? Help please...

Dec 5 '05 #4
Check this one..
http://www.dotnetheaven.com/Uploadfi...0-396712ca0c0d

"Andrew" wrote:
thanks, but that page is no longer there.

any other reference paper?

"Santhi Maadhaven" wrote:
Hi Andrew,
In asp.net 1.1, we can do cross posting by omitting the runat="server"
attribute in the form tag.But the drawback here is uve to use HTML controls
instead of server controls..
See the below article for more info
http://www.c-sharpcorner.com/Code/20...ostingData.asp

If u want to use server controls ,then u can persist values in another page
by using session,querystring.

"Andrew" wrote:
Hello, friends,

I tried to do cross-page posting, i.e., in firstpage.aspx I used
action="secondpage.aspx".

Since I am using asp.net 1.1, so it always goes back to firstpage.aspx
aftern submitting firstpage.aspx.

I then tried in page_load of firstpage.aspx:

if (this.IsPostBack)
{
Server.Transfer("secondpage.aspx");
}

It did go to secondpage.aspx, but all submitted info were lost and could not
be seen in secondpage.aspx.

Any sample source code, reference papers? Help please...

Dec 5 '05 #5
Hi,

I would not do the transfer/redirect in Page_Load method, by checking
IsPostBack.
Good practice is using the corresponding event handler methods for the
same. For example, if you have a button, named SaveButton, there would
be a event handler, namely SaveButton_Click(). In this method, use the
HttpContext properties/methods to save the values posted back by the
form. Then do the Server.Transfer(). The other page would be able to
retrieve the values using HttpContect properties/methods.

Cheers!
Rajeev Gopal
http://www.geekswithblogs.net/rajeevgopal

Dec 5 '05 #6
Santhi but the page is there at:-
http://www.c-sharpcorner.com/Code/20...ostingData.asp
or also try:- http://aspnet101.com/aspnet101/tutorials.aspx?id=20
Patrick
"Andrew" <An****@discussions.microsoft.com> wrote in message
news:80**********************************@microsof t.com...
thanks, but that page is no longer there.

any other reference paper?

"Santhi Maadhaven" wrote:
Hi Andrew,
In asp.net 1.1, we can do cross posting by omitting the runat="server" attribute in the form tag.But the drawback here is uve to use HTML controls instead of server controls..
See the below article for more info
http://www.c-sharpcorner.com/Code/20...ostingData.asp

If u want to use server controls ,then u can persist values in another page by using session,querystring.

"Andrew" wrote:
Hello, friends,

I tried to do cross-page posting, i.e., in firstpage.aspx I used
action="secondpage.aspx".

Since I am using asp.net 1.1, so it always goes back to firstpage.aspx
aftern submitting firstpage.aspx.

I then tried in page_load of firstpage.aspx:

if (this.IsPostBack)
{
Server.Transfer("secondpage.aspx");
}

It did go to secondpage.aspx, but all submitted info were lost and could not be seen in secondpage.aspx.

Any sample source code, reference papers? Help please...

Dec 6 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Web Science | last post by:
Site and Features: http://www.eigensearch.com Search engine, eigenMethod, eigenvector, mathematical, manifolds, science, technical, search tools, eigenmath, Jacobian, quantum, mechanics,...
1
by: Koen | last post by:
Hi! What is the method you use to handle memory allocation failure in C++ using the "new" operator? I used to only check if a NULL pointer is returned after the "new" call, but that's probably...
0
by: Web Science | last post by:
Site and Features: http://www.eigensearch.com Search engine, eigenMethod, eigenvector, mathematical, manifolds, science, technical, search tools, eigenmath, Jacobian, quantum, mechanics,...
0
by: Web Science | last post by:
Site and Features: http://www.eigensearch.com Search engine, eigenMethod, eigenvector, mathematical, manifolds, science, technical, search tools, eigenmath, Jacobian, quantum, mechanics,...
3
by: jlamanna | last post by:
I was wondering if there was a utility that could tell you when your C# application is making cross-apartment COM calls. I have a fairly large application that makes extensive use of a 3rd party...
13
by: Abhishek | last post by:
Hi, how do I pass the handle of a control to the win32 api mouse_event. so that it will create the click event on that application only even if there is any other window in front of it. I dont...
1
by: Rob Woodworth | last post by:
Hi, I'm having serious problems getting my report to work. I need to generate a timesheet report which will contain info for one employee between certain dates (one week's worth of dates). I...
3
by: aspmonger | last post by:
Hello, I really believe that IE 6 has a new (intentional?) bug that severely limits the capability of dhtml and cross domain scripting. Yesterday, I read an interesting article about the subject and...
8
by: dmoore | last post by:
Hi folks, I've seen the following issue come up in multiple posts to this mailing list: I have a python program that spawns a child process with popen or popen2 or popen3 or popen2.popen2...
6
by: Bart Van der Donck | last post by:
Hello, I'm presenting my new library 'AJAX Cross Domain' - a javascript extension that allows to perform cross-domain AJAX requests. http://www.ajax-cross-domain.com/ Any comments or...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.