Click here to Skip to main content
Licence 
First Posted 13 Jun 2006
Views 13,513
Bookmarked 12 times

How to hide a user control in vs2005

By SeaWater | 13 Jun 2006 | Unedited contribution
This article describes how to hide a user control in vs2005
3 votes, 60.0%
1

2
1 vote, 20.0%
3

4
1 vote, 20.0%
5
1.55/5 - 5 votes
μ 1.55, σa 3.13 [?]

Introduction

In VS 2003, when you added a web user control to a web form it appeared as an 
"box" in design view.  This makes it easy to manage multiple user controls in one page.

In VS 2005, when you add a web user control to a web form, it appears as designed.

Problem

The problem is that it does not let you scroll through the rest of the other components on the form that are not part of the user control.

Solution

The solution is the wrap your user controls in the form around a placeholder.  This will make the control not display in the form.  Here is an example of hiding a control called UsercontrolTEST1 with a placerholder called PlaceHolder1:


<asp:PlaceHolder ID="PlaceHolder1" runat="server">
            <uc1:usercontrolTEST ID="UsercontrolTEST1" runat="server" />
</asp:PlaceHolder>

That's All Folks! Short and Simple.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

SeaWater

Web Developer

United States United States

Member


Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
QuestionWhat are those weired colors for? PinmemberJun Du8:45 13 Jun '06  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web04 | 2.5.120210.1 | Last Updated 13 Jun 2006
Article Copyright 2006 by SeaWater
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid