athadu Posted September 9, 2013 Report Posted September 9, 2013 Asalu req ent?? Master page lo unna label.. content pages lo unna content ni batti visible or ivisible avala??
prayaanam Posted September 9, 2013 Report Posted September 9, 2013 any update....please post the solution...
randomguy Posted September 9, 2013 Author Report Posted September 9, 2013 in detail abt problem:i have login page and choose app and area slection pages under root master page...root master as lbllogintype label.lblogintype shows the user role type on the page left hand site .roletype is displayed in area selection page but not in choose app page..
prayaanam Posted September 9, 2013 Report Posted September 9, 2013 [quote name='ShockWave' timestamp='1378750310' post='1304225665'] code in choose app page protected void Page_Load(object sender, EventArgs e) { Root Master = new Root(); //((Label)Master.FindControl("mylbl")).Visible = true; if (!Page.IsPostBack) { strUser = Convert.ToString(Session["AdmLoginType"]); if ((Session["AdmLoginType"]) == null) { Label mpLabel;//= default(Label); mpLabel = (Label)Master.FindControl("lblLoginType"); [color=#b22222][b]mpLabel.visible = true;[/b][/color] Session["RoleLabel"] = objCC.LoginType(Convert.ToString(Session["LoginType"])); // - TODO if (mpLabel != null) { mpLabel.Text = strRoleLabel; } } else { Label mpLabel;//= default(Label); mpLabel = (Label)Master.FindControl("lblLoginType"); [color=#b22222] [b]mpLabel.visible = true;[/b][/color] Session["RoleLabel"] = objCC.LoginType(Convert.ToString(Session["AdmLoginType"])); // - TODO if (mpLabel != null) { mpLabel.Text = strRoleLabel; } DataSet ds = null; ds = objBC.ExecuteStoredProcedure("usp_Adm_GetApplicationsForUser", "AgentID", Convert.ToString(Session["AdmAgentID"])); DropDownList1.DataSource = ds; DropDownList1.DataTextField = "ApplicationName"; DropDownList1.DataValueField = "ApplicationID"; DropDownList1.DataBind(); DropDownList1.Items.Insert(0, new ListItem("Select", "Select")); DropDownList1.SelectedIndex = 0; } } [/quote] ee ine include chesi theesesaava...? asalu pettaney ledaa..?
randomguy Posted September 9, 2013 Author Report Posted September 9, 2013 [quote name='prayaanam' timestamp='1378751033' post='1304225747'] ee ine include chesi theesesaava...? asalu pettaney ledaa..? [/quote] a lines include chesthe yela error vachindi anduke tisesanu 'System.Web.UI.WebControls.Label' does not contain a definition for 'visible' and no extension method 'visible' accepting a first argument of type 'System.Web.UI.WebControls.Label' could be found (are you missing a using directive or an assembly reference?)
randomguy Posted September 9, 2013 Author Report Posted September 9, 2013 to get rid of the above error i have included namespace System.Web.UI.WebControls.Label' which takes out the error in previous post but it genereates a new error"A using namespace directive can only be applied to namespaces; 'System.Web.UI.WebControls.Label' is a type not a namespace"
prayaanam Posted September 9, 2013 Report Posted September 9, 2013 [quote name='ShockWave' timestamp='1378751986' post='1304225882'] a lines include chesthe yela error vachindi anduke tisesanu 'System.Web.UI.WebControls.Label' does not contain a definition for 'visible' and no extension method 'visible' accepting a first argument of type 'System.Web.UI.WebControls.Label' could be found (are you missing a using directive or an assembly reference?) [/quote] Hmmm......very strange..........Label ki aa property vundi.... [url="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.label.aspx"]http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.label.aspx[/url] Do you have this namespace included in the page...? [url="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.aspx"]System.Web.UI.WebControls[/url]
prayaanam Posted September 9, 2013 Report Posted September 9, 2013 [quote name='ShockWave' timestamp='1378752320' post='1304225933'] to get rid of the above error i have included namespace System.Web.UI.WebControls.Label' which takes out the error in previous post but it genereates a new error"A using namespace directive can only be applied to namespaces; 'System.Web.UI.WebControls.Label' is a type not a namespace" [/quote] Label anedhi just control.... Use this instead and lemme know [url="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.aspx"]System.Web.UI.WebControls[/url][color=#282828][font=helvetica, arial, sans-serif] [/font][/color]
karna11 Posted September 9, 2013 Report Posted September 9, 2013 [quote name='ShockWave' timestamp='1378750343' post='1304225667'] code in root master page public partial class Root : System.Web.UI.MasterPage { private string LoginType = string.Empty; protected void Page_Load(object sender, EventArgs e) { [color=#ff0000]LoginType[/color] = lblLoginType.Text; } public string RoleLabel { get { return LoginType; } set { LoginType = value; } } public Root() { Load += Page_Load; } } [/quote] idhi entidhi? aa control?
randomguy Posted September 9, 2013 Author Report Posted September 9, 2013 [quote name='karna11' timestamp='1378755117' post='1304226181'] idhi entidhi? aa control? [/quote] Session["LoginType"] = 2; logintype is a session variable application has 4 logintypes 1,2,3,4 based on the number their corresponding name is displayed on all pages
Recommended Posts