Hide ASP.Net Web User Control (.ascx) using Javascript/Code Behind
-
Hi To All, I have a Ajax tab container A. The tab container A has one tab panel A1. In tab panel A1, first I have placed web user control(.ascx) and then added one tab container B. B tab container has three sub tab panels B1, B2, B3. I want to hide the user control only when tab panel B2 is selected. So, How can I hide the ASP.Net Web User Control using JavaScript or code behind? Any Help regarding this will be greatly appreciated.. Thanks in Advance...!!!!
-
Hi To All, I have a Ajax tab container A. The tab container A has one tab panel A1. In tab panel A1, first I have placed web user control(.ascx) and then added one tab container B. B tab container has three sub tab panels B1, B2, B3. I want to hide the user control only when tab panel B2 is selected. So, How can I hide the ASP.Net Web User Control using JavaScript or code behind? Any Help regarding this will be greatly appreciated.. Thanks in Advance...!!!!
If u have registered the user control on the page, then try this code on Tab index change event of Tab container B
UserControlID.Visible = true;
Let me know if it works. Tej Aj, http://opexsolution.com/forum/[^] Fan of: http://www.abtstudioz.com/[^]
modified on Tuesday, July 20, 2010 2:39 AM
-
If u have registered the user control on the page, then try this code on Tab index change event of Tab container B
UserControlID.Visible = true;
Let me know if it works. Tej Aj, http://opexsolution.com/forum/[^] Fan of: http://www.abtstudioz.com/[^]
modified on Tuesday, July 20, 2010 2:39 AM
Thanks for the reply Tej.. Yeah, I have already registered the User Control on the Page. I have earlier tried with the OnActiveTabChanged event of the tab container and set the AutoPostBack property to True. But, I have the older version of Ajax Control toolkit, which not supported the AutoPosBack event for tab container. So the tab index changed event not fired when I changed the tabs. Now, I update the reference to newer version 3.0. Earlier it was 1.0 That's resolved my problem.. Thanks a lot once again for ur reply.. Have a gr8 day.....:)