Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Hide ASP.Net Web User Control (.ascx) using Javascript/Code Behind

Hide ASP.Net Web User Control (.ascx) using Javascript/Code Behind

Scheduled Pinned Locked Moved ASP.NET
questioncsharpjavascriptasp-netdocker
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    NTheOne
    wrote on last edited by
    #1

    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...!!!!

    T 1 Reply Last reply
    0
    • N NTheOne

      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...!!!!

      T Offline
      T Offline
      Tej Aj
      wrote on last edited by
      #2

      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

      N 1 Reply Last reply
      0
      • T Tej Aj

        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

        N Offline
        N Offline
        NTheOne
        wrote on last edited by
        #3

        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.....:)

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups