Solved

Custom properties don't show at design time?

Posted on 2008-10-18
5
292 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
[X]
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
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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

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 …
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

696 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