c# - Getting values from master page to child page in asp.net -


i have master page masterpage.master in have stored value in variable is

string name = (string)(session["myname"]); 

now want use value in "name" child pages of masterpage.master without using session on every page. can achieve that? if yes..then please tell.

i using c# , asp.net webforms

you can try this:

   // master page file (storing value in label)     string name = (string)(session["myname"]);     lblmsg.text= name;     // cs file     label str = master.findcontrol("lblmsg") label;     textbox10.text = str.text ; 

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -