Issue in accessing session data in radwindow popup data in IE

2 posts, 0 answers
  1. Abhay
    Abhay avatar
    1 posts
    Member since:
    Apr 2016

    Posted 06 Apr Link to this post

    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.

     

     

  2. Danail Vasilev
    Admin
    Danail Vasilev avatar
    1492 posts

    Posted 11 Apr Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top