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

Issue in accessing session data in radwindow popup data in IE

1 Answer 84 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Abhay
Top achievements
Rank 1
Abhay asked on 06 Apr 2016, 10:07 AM

Hi,

Need help Issue in accessing session data in radwindow popup data in IE.

In our ASP.net application we stored datatable in session and using below code to open the popup.

string script = "function f(){$find(\"" + Window.ClientID + "\").show(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);";
ScriptManager.RegisterStartupScript(Page, Page.GetType(), "key", script, true);

but we are facing issue to access session data in popup window(.aspx page) in IE we checked in chrome it is working fine.

Please let us know if more details required, can you please provide solution or any help.

Thank you in advance.

 

 

1 Answer, 1 is accepted

Sort by
0
Danail Vasilev
Telerik team
answered on 11 Apr 2016, 06:52 AM
Hi Abhay,

Can you ensure the issue is related to the RadWindow? I am asking because I have made a test with the code below and it works properly on my side:

ASPX:
<form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
    <script>
        var sessionVar = '<%= Session["VariableName"]%>';
    </script>
    <telerik:RadButton ID="RadButton1" runat="server" OnClick="RadButton1_Click" Text="Open Window" />
    <telerik:RadWindow ID="Window" runat="server">
        <ContentTemplate>
            <input type="button" name="name" value="Get Session Variable" onclick="alert(sessionVar); return false;" />
        </ContentTemplate>
    </telerik:RadWindow>
</form>

C#:
protected void Page_Load(object sender, EventArgs e)
{
    Session["VariableName"] = "my session variable";
}
protected void RadButton1_Click(object sender, EventArgs e)
{
    string script = "function f(){$find(\"" + Window.ClientID + "\").show(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);";
    ScriptManager.RegisterStartupScript(Page, Page.GetType(), "key", script, true);
}


Regards,
Danail Vasilev
Telerik
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
General Discussions
Asked by
Abhay
Top achievements
Rank 1
Answers by
Danail Vasilev
Telerik team
Share this question
or