karna11 Posted September 9, 2013 Report Posted September 9, 2013 [quote name='ShockWave' timestamp='1378755543' post='1304226218'] 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 [/quote] akkada break point pettithee value em vasthundhi?
randomguy Posted September 9, 2013 Author Report Posted September 9, 2013 [quote name='karna11' timestamp='1378755742' post='1304226248'] akkada break point pettithee value em vasthundhi? [/quote] when i logon to the application i will use root master page which has 3 content pages of which 1 content page gets the role displayed on the left hand of the page that is in area selection page.but in 2 content page which makes use of the label of master page (root master) choose app page is not displaying the role in label. but it shows up in 3 page when i debugged using break point logintype has a role name in other 2 pages except on choose app page..it has nothing in logintype
karna11 Posted September 9, 2013 Report Posted September 9, 2013 [quote name='ShockWave' timestamp='1378756390' post='1304226325'] when i logon to the application i will use root master page which has 3 content pages of which 1 content page gets the role displayed on the left hand of the page that is in area selection page.but in 2 content page which makes use of the label of master page (root master) choose app page is not displaying the role in label. but it shows up in 3 page when i debugged using break point logintype has a role name in other 2 pages except on choose app page..it has nothing in logintype [/quote] in the 2nd page in page load method aa condition lo ki velthundhi debug chesthee if loka or else lokaa?
randomguy Posted September 9, 2013 Author Report Posted September 9, 2013 [quote name='karna11' timestamp='1378756594' post='1304226355'] in the 2nd page in page load method aa condition lo ki velthundhi debug chesthee if loka or else lokaa? [/quote] else loki bhayya...
karna11 Posted September 9, 2013 Report Posted September 9, 2013 [quote name='ShockWave' timestamp='1378756733' post='1304226371'] else loki bhayya... [/quote] [color=#282828][font=helvetica, arial, sans-serif] [/font][/color][color=#ff0000][font=helvetica, arial, sans-serif] else[/font][/color] [color=#282828][font=helvetica, arial, sans-serif] {[/font][/color] [color=#282828][font=helvetica, arial, sans-serif] Label mpLabel;//= default(Label);[/font][/color] [color=#282828][font=helvetica, arial, sans-serif] mpLabel = (Label)Master.FindControl("lblLoginType");[/font][/color] [color=#282828][font=helvetica, arial, sans-serif] Session["RoleLabel"] = objCC.LoginType(Convert.ToString(Session["AdmLoginType"])); // - TODO[/font][/color] [color=#282828][font=helvetica, arial, sans-serif] if (mpLabel != null)[/font][/color] [color=#282828][font=helvetica, arial, sans-serif] {[/font][/color] [color=#282828][font=helvetica, arial, sans-serif] mpLabel.Text = strRoleLabel;[/font][/color] [color=#282828][font=helvetica, arial, sans-serif] }[/font][/color] [color=#282828][font=helvetica, arial, sans-serif] DataSet ds = null;[/font][/color] [color=#282828][font=helvetica, arial, sans-serif] ds = objBC.ExecuteStoredProcedure("usp_Adm_GetApplicationsForUser", "AgentID", Convert.ToString(Session["AdmAgentID"]));[/font][/color] [color=#282828][font=helvetica, arial, sans-serif] DropDownList1.DataSource = ds;[/font][/color] [color=#282828][font=helvetica, arial, sans-serif] DropDownList1.DataTextField = "ApplicationName";[/font][/color] [color=#282828][font=helvetica, arial, sans-serif] DropDownList1.DataValueField = "ApplicationID";[/font][/color] [color=#282828][font=helvetica, arial, sans-serif] DropDownList1.DataBind();[/font][/color] [color=#282828][font=helvetica, arial, sans-serif] DropDownList1.Items.Insert(0, new ListItem("Select", "Select"));[/font][/color] [color=#282828][font=helvetica, arial, sans-serif] DropDownList1.SelectedIndex = 0;[/font][/color] aa else looo if condition ni break point touch ayinappudu mplabel kii em value vasthundhi?
randomguy Posted September 9, 2013 Author Report Posted September 9, 2013 [quote name='karna11' timestamp='1378757175' post='1304226410'] [color=#ff0000][font=helvetica, arial, sans-serif]else[/font][/color] [color=#282828][font=helvetica, arial, sans-serif] {[/font][/color] [color=#282828][font=helvetica, arial, sans-serif] Label mpLabel;//= default(Label);[/font][/color] [color=#282828][font=helvetica, arial, sans-serif] mpLabel = (Label)Master.FindControl("lblLoginType");[/font][/color] [color=#282828][font=helvetica, arial, sans-serif] Session["RoleLabel"] = objCC.LoginType(Convert.ToString(Session["AdmLoginType"])); // - TODO[/font][/color] [color=#282828][font=helvetica, arial, sans-serif] if (mpLabel != null)[/font][/color] [color=#282828][font=helvetica, arial, sans-serif] {[/font][/color] [color=#282828][font=helvetica, arial, sans-serif] mpLabel.Text = strRoleLabel;[/font][/color] [color=#282828][font=helvetica, arial, sans-serif] }[/font][/color] [color=#282828][font=helvetica, arial, sans-serif] DataSet ds = null;[/font][/color] [color=#282828][font=helvetica, arial, sans-serif] ds = objBC.ExecuteStoredProcedure("usp_Adm_GetApplicationsForUser", "AgentID", Convert.ToString(Session["AdmAgentID"]));[/font][/color] [color=#282828][font=helvetica, arial, sans-serif] DropDownList1.DataSource = ds;[/font][/color] [color=#282828][font=helvetica, arial, sans-serif] DropDownList1.DataTextField = "ApplicationName";[/font][/color] [color=#282828][font=helvetica, arial, sans-serif] DropDownList1.DataValueField = "ApplicationID";[/font][/color] [color=#282828][font=helvetica, arial, sans-serif] DropDownList1.DataBind();[/font][/color] [color=#282828][font=helvetica, arial, sans-serif] DropDownList1.Items.Insert(0, new ListItem("Select", "Select"));[/font][/color] [color=#282828][font=helvetica, arial, sans-serif] DropDownList1.SelectedIndex = 0;[/font][/color] aa else looo if condition ni break point touch ayinappudu mplabel kii em value vasthundhi? [/quote] null bhayya
karna11 Posted September 9, 2013 Report Posted September 9, 2013 [quote name='ShockWave' timestamp='1378757476' post='1304226432'] null bhayya [/quote] Adhi problem. For testing purpose change to equl to null instead of not equal to null. Marchi chudu oka vela work ithee then asalendhuku null avuthundhooo chudochuuu
randomguy Posted September 9, 2013 Author Report Posted September 9, 2013 [quote name='karna11' timestamp='1378758107' post='1304226491'] Adhi problem. For testing purpose change to equl to null instead of not equal to null. Marchi chudu oka vela work ithee then asalendhuku null avuthundhooo chudochuuu [/quote] if i debug it making mplabel to null instead of not equal to null Object reference not set to an instance of an object...ee error vachindi
karna11 Posted September 9, 2013 Report Posted September 9, 2013 [quote name='ShockWave' timestamp='1378758892' post='1304226582'] if i debug it making mplabel to null instead of not equal to null Object reference not set to an instance of an object...ee error vachindi [/quote] Ekkada vachindhiiib aaa error? Exact gaaa if condition lopalaa.?
randomguy Posted September 9, 2013 Author Report Posted September 9, 2013 [quote name='karna11' timestamp='1378759953' post='1304226749'] Ekkada vachindhiiib aaa error? Exact gaaa if condition lopalaa.? [/quote] if (mpLabel != null) { mpLabel.Text = strRoleLabel; } if condition lo unna code lo vachindi
karna11 Posted September 9, 2013 Report Posted September 9, 2013 [quote name='ShockWave' timestamp='1378760336' post='1304226805'] if (mpLabel != null) { mpLabel.Text = strRoleLabel; } if condition lo unna code lo vachindi [/quote] Aa strRoleLabel ekkadnyndi vasthundhi? Dhani ki object ekkada create chesav.
randomguy Posted September 9, 2013 Author Report Posted September 9, 2013 [quote name='karna11' timestamp='1378760843' post='1304226881'] Aa strRoleLabel ekkadnyndi vasthundhi? Dhani ki object ekkada create chesav. [/quote] rest of the code which deals with strrolelabel public partial class ChooseApp : System.Web.UI.Page { DBClass database = new DBClass(); CREX.BusinessLayer.BusinessClass objBC = new CREX.BusinessLayer.BusinessClass(); CREX.DataLayer.ConstantsClass objCC = new CREX.DataLayer.ConstantsClass(); string strRoleLabel; string strUser = ""; 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"); //mpLabel.visible = true; 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"); 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; } } }
prayaanam Posted September 9, 2013 Report Posted September 9, 2013 [quote name='ShockWave' timestamp='1378762527' post='1304227027'] rest of the code which deals with strrolelabel public partial class ChooseApp : System.Web.UI.Page { DBClass database = new DBClass(); CREX.BusinessLayer.BusinessClass objBC = new CREX.BusinessLayer.BusinessClass(); CREX.DataLayer.ConstantsClass objCC = new CREX.DataLayer.ConstantsClass(); [color=#b22222][b] string strRoleLabel = " ";[/b][/color] string strUser = ""; 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"); //mpLabel.visible = true; 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"); 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] [color=#282828][font=helvetica, arial, sans-serif]strRoleLabel ki ekkada value assign cheyyaley kada.... obvious ga null vuntaadi....[/font][/color] [color=#282828][font=helvetica, arial, sans-serif] [/font][/color][color=#282828][font=helvetica, arial, sans-serif]Red highlighted change chesi choodu.... [/font][/color]
karna11 Posted September 9, 2013 Report Posted September 9, 2013 for testing purpose ila change chesi chudu [color=#282828][font=helvetica, arial, sans-serif][size=3][background=rgb(247, 247, 247)]if (mpLabel == null)[/background][/size][/font][/color] [color=#282828][font=helvetica, arial, sans-serif][size=3][background=rgb(247, 247, 247)]{[/background][/size][/font][/color] [color=#282828][font=helvetica, arial, sans-serif][size=3][background=rgb(247, 247, 247)]mpLabel.Text = "your Name";[/background][/size][/font][/color] [color=#282828][font=helvetica, arial, sans-serif][size=3][background=rgb(247, 247, 247)]}[/background][/size][/font][/color] [color=#282828][font=helvetica, arial, sans-serif][size=3][background=rgb(247, 247, 247)]ila koda rakapotheee nee mplabel master page nundiii sariggga ravadem ledhu anukuntaa, adhi next text mundhu pi code change chesi chudu[/background][/size][/font][/color]
karna11 Posted September 10, 2013 Report Posted September 10, 2013 evadavayyaa nuvvu problem clear ayyindhoo ledhooo cheppaventiiii,, plzz ilaa ithee inko sari help ani post veyyaku
Recommended Posts