473,490 Members | 2,486 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 5323
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
8517
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
1246
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
2183
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
1299
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
7522
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
4757
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
6315
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
4414
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
5135
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
7112
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
6974
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7146
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,...
1
6852
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7356
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
5448
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,...
0
3084
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3074
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
628
muto222
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.