c# - Make User Control load before page -



c# - Make User Control load before page -

i have 3 parts site, site master, user command (inside site master) , general page.

when user logs in redirected general page. user command dropdownlist of different accounts (auto select first account) get's username , runs stored procedure pull info siteid session variable.

then in general page set labels users information. code.

if (session["siteid"] != null) { siteid = int.parse(session["siteid"].tostring()); populateaccountdata(); populateaccountinformation2(); populatesitenodes(); populatesitemap(); } else { labelsitename.text = "no site selected"; }

the problem when page loads first time not have session["siteid"], have nail refresh load.

i new asp.net i'm not sure if i'm doing right, how load first time?

use : ispostback

look : //www.java-samples.com/showtutorial.php?tutorialid=1083

c# asp.net

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -