Custom properties don't show at design time?

Posted on 2008-10-18
Medium Priority
Last Modified: 2013-11-26
I am building a website in ASP.NET, and I use WebUserControls heavily. Most of the webusercontrols have custom properties, declared public in the code-behind. Some of hte properties are bindable, some aren't, all of them are public.

How come only SOME of the time I can see those properties in design-mode in Visual Studio? I can always set them in the source code, but sometimes they won't show in the properties window, and sometimes they will. And sometimes, only a couple of them show and a third one isn't there.
Question by:Frosty555
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2

Accepted Solution

AhmedHindy earned 2000 total points
ID: 22750876
i think you have to give the property the suitable attribute like <Browsable(True)> _

Expert Comment

ID: 22750951
i think you have to give the property the suitable attribute like
 <Browsable(True)> _
LVL 31

Author Comment

ID: 22750961
I didn't realize you had to explicitely specify. I've put that into some of my properties now.

But... it's still not working. And it was JUST working for this control! I built the webusercontrol, put the properties in, looked at it in another page - everything was visible from design mode - ran the project, and now when I go back.... it's gone! And it won't come back. These properties DO specify the  Browsable attribute.

... man what the heck is going on here?
LVL 31

Author Comment

ID: 22750998
Ooh, it just came back. I added a fifth parameter and now suddenly all parameters are visible from design view. Screenshot attached (note - the webusercontrol looks like a hyperlink but it's actually a webusercontrol with a hyperlink inside of it)

But the properties don't show on my other web user controls. This is very strange.
LVL 31

Author Comment

ID: 22783394
Okay, after playing with it a bit, I think your suggestion was correct. Perhaps I just needed to restart ASP.NET.

It seems the custom properties disappear if I go into the code directly and add attributes to the tags myself. Maybe when you custom edit it like that you lose the ability to see it in design mode.

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question