This is a migrated thread and some comments may be shown as answers.

Cross Page Posting problem

2 Answers 56 Views
Window
This is a migrated thread and some comments may be shown as answers.
Vasssek
Top achievements
Rank 1
Vasssek asked on 11 Sep 2010, 07:52 AM

Hello Telerik Team,

In my project I need to open a new page from source page. On the target page I need to access Page.PreviousPage property. This can be done just when you specify PostBackURL attribute on e.g. asp:button control.

I call openning target page from client side as:

<asp:Button ID="Button2" OnClientClick="OpenAttachmentWindow(); return false;" runat="server"></asp:Button>
Javascript function is:
function OpenAttachmentWindow() { 
               var wnd = $find("<%= AttachmentWindow.ClientID %>");                 
               wnd.show(); 
           }
RadWindow definition on :
<telerik:RadWindowManager ID="RadWindowManager2" runat="server">
    <Windows>
        <telerik:RadWindow runat="server" Width="560px" Height="440px" 
            NavigateUrl="~/Pages/AttachmentWindow.aspx" ID="AttachmentWindow"
            Modal="true" ReloadOnShow="true" Animation="Fade" Title="ńĆakajte">
        </telerik:RadWindow>
    </Windows>
</telerik:RadWindowManager>

 


The question is how can I open target page from source page via RadWindow and apply PostBackURL or Server.transfer from server side which allows me to access Page.PreviousPage property.

I've found some useful links to my needs on the web.
http://www.dotnetcurry.com/ShowArticle.aspx?ID=71
http://ramanisandeep.wordpress.com/2010/01/09/access-viewstate-across-pages-in-asp-net/

Thank you for your help...

Regards Vasssek

2 Answers, 1 is accepted

Sort by
0
Cori
Top achievements
Rank 2
answered on 13 Sep 2010, 05:24 PM
I doubt you can achieve what you want to do by using the RadWindow, since the RadWindow just opens the page in an iframe, so your target page has no access to the calling page, outside of javascript. So pretty much, you can't find out the calling page in your code.

I hope that helps.
0
Accepted
Georgi Tunev
Telerik team
answered on 14 Sep 2010, 11:41 AM
Hi guys,

Cori is right - when displaying a content page (i.e. NavigateUrl is set), RadWindow displays that content page in an IFRAME. Because the content and the parent pages are different and the content is displayed in a container in the parent, you cannot access the parent page directly from codebehind (and vice versa).



Sincerely yours,
Georgi Tunev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Window
Asked by
Vasssek
Top achievements
Rank 1
Answers by
Cori
Top achievements
Rank 2
Georgi Tunev
Telerik team
Share this question
or