Solved

Custom properties don't show at design time?

Posted on 2008-10-18
5
289 Views
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.
0
Comment
Question by:Frosty555
  • 3
  • 2
5 Comments
 
LVL 4

Accepted Solution

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

Expert Comment

by:AhmedHindy
ID: 22750951
i think you have to give the property the suitable attribute like
 <Browsable(True)> _
OR
[Browsable(true)]
0
 
LVL 31

Author Comment

by:Frosty555
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?
0
 
LVL 31

Author Comment

by:Frosty555
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.
prop1.jpg
0
 
LVL 31

Author Comment

by:Frosty555
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.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

770 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