473,471 Members | 2,017 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

PostBackURL

Hello,

Can you use the PostBackUrl to post to different sites? I have a page
(PostBackURL.aspx' ) on one website (same server) that has a button set to:

PostBackURL="http://zone1.web.com"

When the second page opened, and tried to get a hidden value on the previous
page, I got the following error:

The file '/xaspx/zTest/PostBackURL.aspx' does not exist.

this.hdnQV01.Value =
((HiddenField)PreviousPage.FindControl("hdnCourse" )).Value;

Any help with this would be appreciated.

Thanks, sck10
Nov 22 '06 #1
4 5319
From the MSDN:
--------
If the source and target page are in different applications, you cannot
directly get the values of controls on the page, but you can read the posted
data from the Form dictionary. You cannot read view state from the source
page, because it is hashed. If you want to store values in the source page
and make them available in a target page in another application, you can
store the values as strings inside hidden fields on the source page and
access them through Request.Form on the target page.

-------

So try the Request.Form.
--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]

"sck10" <sc***@online.nospamwrote in message
news:O0*************@TK2MSFTNGP03.phx.gbl...
Hello,

Can you use the PostBackUrl to post to different sites? I have a page
(PostBackURL.aspx' ) on one website (same server) that has a button set
to:

PostBackURL="http://zone1.web.com"

When the second page opened, and tried to get a hidden value on the
previous page, I got the following error:

The file '/xaspx/zTest/PostBackURL.aspx' does not exist.

this.hdnQV01.Value =
((HiddenField)PreviousPage.FindControl("hdnCourse" )).Value;

Any help with this would be appreciated.

Thanks, sck10

Nov 22 '06 #2
Hello Steve,

From your description, what you want to do is post data from one of your
ASP.NET application to another ASP.NET application hosted on a remote
server, correct?

Based on the code snippet you provided, it seems you're using the cross
page posting in ASP.NET 2.0 for pages in separate web application(server)
,yes ? If so, I'm afraid this is not supported, crosspage posting can only
be used in pages within the same ASP.NET web application. For your
scenario, if you have an html input hidden field in the source page(who
send the post to target page), you can use its "name" to retrieve its value
from the Request.Form collection. e.g.

=====in target page=========

protected void Page_Load(object sender, EventArgs e)
{

string value = Request.Form["hdnCourse"];
....................

}
==================

Does this work for you? Please feel free to let me know if there is any
other concern here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
Nov 22 '06 #3
Thanks Eliyahu,
"Eliyahu Goldin" <RE**************************@mMvVpPsS.orgwrote in
message news:eQ**************@TK2MSFTNGP04.phx.gbl...
From the MSDN:
--------
If the source and target page are in different applications, you cannot
directly get the values of controls on the page, but you can read the
posted data from the Form dictionary. You cannot read view state from the
source page, because it is hashed. If you want to store values in the
source page and make them available in a target page in another
application, you can store the values as strings inside hidden fields on
the source page and access them through Request.Form on the target page.

-------

So try the Request.Form.
--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]

"sck10" <sc***@online.nospamwrote in message
news:O0*************@TK2MSFTNGP03.phx.gbl...
>Hello,

Can you use the PostBackUrl to post to different sites? I have a page
(PostBackURL.aspx' ) on one website (same server) that has a button set
to:

PostBackURL="http://zone1.web.com"

When the second page opened, and tried to get a hidden value on the
previous page, I got the following error:

The file '/xaspx/zTest/PostBackURL.aspx' does not exist.

this.hdnQV01.Value =
((HiddenField)PreviousPage.FindControl("hdnCourse ")).Value;

Any help with this would be appreciated.

Thanks, sck10


Nov 22 '06 #4
Thanks Steven, Appreciate it...
"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:Mt**************@TK2MSFTNGXA01.phx.gbl...
Hello Steve,

From your description, what you want to do is post data from one of your
ASP.NET application to another ASP.NET application hosted on a remote
server, correct?

Based on the code snippet you provided, it seems you're using the cross
page posting in ASP.NET 2.0 for pages in separate web application(server)
,yes ? If so, I'm afraid this is not supported, crosspage posting can only
be used in pages within the same ASP.NET web application. For your
scenario, if you have an html input hidden field in the source page(who
send the post to target page), you can use its "name" to retrieve its
value
from the Request.Form collection. e.g.

=====in target page=========

protected void Page_Load(object sender, EventArgs e)
{

string value = Request.Form["hdnCourse"];
...................

}
==================

Does this work for you? Please feel free to let me know if there is any
other concern here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================

This posting is provided "AS IS" with no warranties, and confers no
rights.


Nov 22 '06 #5

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

Similar topics

1
by: osh | last post by:
All, I am having trouble using the PostBackUrl feature in .NET 2.0. I have several User Controls that are on a MasterPage. The User Controls contain the form fields for a basic search on...
0
by: wendylau81 | last post by:
We are currently using ASP.NET 2.0 to revamp one of our web applications. Let me try to briefly explain how each page is laid out... Usually within the page, there are 3 components... The...
1
by: Wendy | last post by:
I had previously posted this in inetserver.asp.components, I don't think that was the right place... anyways, here is a repost: We are currently using ASP.NET 2.0 to revamp one of our web...
0
by: Wendy | last post by:
We are currently using ASP.NET 2.0 to revamp one of our web applications. Let me try to briefly explain how each page is laid out... Usually within the page, there are 3 components... The header,...
2
by: xeroxero | last post by:
I have the property "PostBackUrl" set on a LinkButton set to "~/page.aspx". I tried to change this value in the Page_Load as well as the Render event to a different page based on some flow/business...
1
by: Chris | last post by:
Hi, i created an ImageButton within an ItemTemplate of a datalist (in shop.aspx). There are two possibilities: 1) when the user is logged and he clicks on an image, he must be 'postbacked' to...
2
by: noneya22 | last post by:
I'm using asp.net 2.0. I have a page that has a save button and a cancel button along with a text field. All controls are asp.net server controls. I have JavaScript that prompts the user if he...
1
by: joseph | last post by:
Hello Could you help i want to use postbackurl to a new window, not replace previous page. i doing something onclientscript="form1.target='_blank'" postbackurl="~/default2.aspx" is not work.
1
by: Jon | last post by:
Hello all, I have a LinkButton with the PostBackUrl set, I also have an OnClick event set. For some reason, the OnClick event is only hit the second time I click the LinkButton. If I remove...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.