How to set javascript data in asp session variable?
- by fazilmir
i am having a div and i am adding innerHtml in it using javascript. now what i want is that i have to set that innerHtml data in my session variable. and want to use that session variable in my another asp webform page. but i dont know how to perform this task.
any help will be highly appreciated.
i am doing it like this.
//cartDetailsDiv is a div in which i am adding innerHtml through javascript.
//now i am getting that innerHTML in my session variable like this
Session["_cartDetails"] = cartDetailsDiv.InnerHtml.ToString();
Response.Write(Session["_cartDetails"].ToString());
but i am getting nothing in my session variable.
please help me out.