Hi
I have user User control for a sidebar menu. Can we disable it on a particular form
Thanks
Hi
I have user User control for a sidebar menu. Can we disable it on a particular form
Thanks
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 attend5days leftRegister
Jignesh KumarRank #91 · 22.9K reputationPosted Jan 27, 2023, 1:11 AM EST
Hello Ramco,
Please refer this link which will help you out,
https://social.msdn.microsoft.com/Forums/en-US/493f7d74-bdc1-47a9-b7db-670e39196c8d/how-to-disable-user-control-pageload?forum=aspwebforms
Naimish MakwanaRank #324 · 7.7K reputationPosted Jan 30, 2023, 5:29 AM EST
Hi Ramco,
Try belwo code.
protected void Page_Load(object sender, EventArgs e) { var masterPage = Master; if (masterPage != null) { (System.Web.UI.UserControl)masterPage.FindControl("")).Enabled = false; } }Thanks
Naimish
Sachin SinghRank #66 · 26.2K reputationPosted Jan 30, 2023, 5:49 AM EST
I think your issue already resolved here
hhhhttps://www.c-sharpcorner.com/forums/hide-user-control-on-basis-of-condition
please extend the same thread if you have any other issues.