Iam using the dropdown list in a master page. I want to get a dropdown list value in the session and I want to use it in any other master page.
How to do this.
To enter the selected value in the session, you can do something like this:
< Pre> safe void ddlMyDropDown_SelectedIndexChanged (object sender, EventArgs e) {session ["MySelectedValue"] = ddlMyDropDown.SelectedValue; }
This key stores the value selected in the session with "MySelectedValue".
When you want to read it back, you can:
// session data fully accessed for public class MySessionData {// logged in user's current user name sub Yogener names are, otherwise void Public string MyUsername {get {return session ["MyUsername"]; } Set {session ["MyUsername"] = value; }}}
No comments:
Post a Comment