473,791 Members | 2,973 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PostBackURL

Hello,

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

PostBackURL="ht tp://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.asp x' does not exist.

this.hdnQV01.Va lue =
((HiddenField)P reviousPage.Fin dControl("hdnCo urse")).Value;

Any help with this would be appreciated.

Thanks, sck10
Nov 22 '06 #1
4 5351
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.n ospamwrote in message
news:O0******** *****@TK2MSFTNG P03.phx.gbl...
Hello,

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

PostBackURL="ht tp://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.asp x' does not exist.

this.hdnQV01.Va lue =
((HiddenField)P reviousPage.Fin dControl("hdnCo urse")).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(ser ver)
,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(objec t 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.orgwro te in
message news:eQ******** ******@TK2MSFTN GP04.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.n ospamwrote in message
news:O0******** *****@TK2MSFTNG P03.phx.gbl...
>Hello,

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

PostBackURL="h ttp://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.asp x' does not exist.

this.hdnQV01.V alue =
((HiddenField) PreviousPage.Fi ndControl("hdnC ourse")).Value;

Any help with this would be appreciated.

Thanks, sck10


Nov 22 '06 #4
Thanks Steven, Appreciate it...
"Steven Cheng[MSFT]" <st*****@online .microsoft.comw rote in message
news:Mt******** ******@TK2MSFTN GXA01.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(ser ver)
,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(objec t 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
8554
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 available homes and properties in a given area. I put these form fields into User Controls because they will be repeated in different ways throughout the site and it would be nice to only update the fields from one place to make a site wide change.
0
1259
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 header, the body, and the footer. The header and footer are user controls created by one of our developers, and contain things that all the pages in our web app should contain. This is done to avoid inconsistencies (so you only change the header once...
1
2207
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 applications. Let me try to briefly explain how each page is laid out... Usually within the page, there are 3 components... The header, the body, and the footer. The header and footer are user controls created by one of our developers, and contain...
0
1316
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, the body, and the footer. The header and footer are user controls created by one of our developers, and contain things that all the pages in our web app should contain. This is done to avoid inconsistencies (so you only change the header once...
2
7560
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 logic. Nothing worked. What is the best way to dynamically define PostBackUrl for a control in a C# code-behind, and what is the best way to know in the receiving page which control fired the PostBack event?
1
4776
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 another file showing that same picture in big size and with more info.. 2) when not logged and clicking on an image, he must be 'postbacked' to the login page (log.aspx).
2
6335
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 has maninpulated data in the text field and then tries to leave the page. The purpose is to prevent the user from accidentally losing his changes. This JavaScript code that accomplishes this is based upon the code found at...
1
4426
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
5155
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 the PostBackUrl attribute it hits it every time. Why is that? Thanks,
0
9669
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10207
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10155
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9995
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7537
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6776
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5559
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4110
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 we have to send another system
2
3718
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.