Hi,
I have one master page and home page. When clicking login button in master page i have to add one web user control into home page. When clciking logout buttton in master page, to hide the usercontrol. Anyone help me.
Thanks
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Abhishek KumarPosted Sep 23, 2014, 5:19 AM
Please find a nice article according to your requirement.
http://www.c-sharpcorner.com/UploadFile/ishbandhu2009/how-bind-user-control-data-on-button-click-with-modal-popup/
Abhishek
Prasham SabadraPosted Sep 23, 2014, 4:46 AM
Just high level approach:
- You can have QueryString parameter
- In the user control event where actual code is, just verify that if query string parameter value say login then only execute the code
- If it is log out the skip the user control code.
- This means your user control will be always there in master page.
I hope this will give an some idea to implement.Thanks!
Deepak Kumar ChoudharyPosted Sep 23, 2014, 4:45 AM
I m attaching demo website accourding to your requiremet i hope it will helpful for you.Find the attached files.
I am using QueryString and WebUserControl properties to do that.