how to display count of add to cart in masterpage? pls reply me
thanks and ragards
sravan
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend3days leftRegister
SenthilkumarRank #387 · 6.5K reputationPosted Jun 4, 2012, 1:27 AM EDT
You need to find the control.
ContentPlaceHolder mpContentPlaceHolder; TextBox mpTextBox; mpContentPlaceHolder = (ContentPlaceHolder)Master.FindControl("ContentPlaceHolder1"); if(mpContentPlaceHolder != null) { mpTextBox = (TextBox) mpContentPlaceHolder.FindControl("TextBox1"); if(mpTextBox != null) { mpTextBox.Text = "TextBox found!"; } } // Gets a reference to a Label control that not in // a ContentPlaceHolder Label mpLabel = (Label) Master.FindControl("masterPageLabel"); if(mpLabel != null) { Label1.Text = "Master page label = " + mpLabel.Text; }Sravan kumar27 reputationPosted Jun 4, 2012, 3:05 AM EDT