2
Reply

How to pass the Values from aspx page to html page using session variable

Kanakaraj V

Kanakaraj V

14y
16.4k
0
Reply

    Take one public variable like

    public string strSessionValue = null;
    then in Page_load event, use

    strSessionValue =Convert.ToString(Session["<XXXXX>"]);

    Now use this variable in aspx page like

    <%=strSessionValue%>

    ASPX Page:


     Session["address"] = TextBox1.Text.ToString();


    HTML Page:
    <input type="text" size="34" name="address" value="<%=Session["address"].ToString()%>" id="text1" />


    But Not Worked..........