473,385 Members | 1,901 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How to set the Description of a property in a custom server control

Hi, I have created a custom Server Control and I want to add a description to the properties and events that the control holds. I have looked over the Internet and came up with the following...

Code:
<Description("Gets/Set somthing for the property")>_
public property Somthing() as Boolean
Get
end get
Set
end set
End property

Unfortunately this does not seem to work in visual studio .net 2008.

I am not sure if i am missing somthing off can anyone help

Thanks in advanvce

altaafhussein
Sep 2 '09 #1
1 1507
tlhintoq
3,525 Expert 2GB
Here's a working one from live code that I use (though it is C#)
It has description as well as several other properties

Expand|Select|Wrap|Line Numbers
  1.         [Category("CustomValues"),
  2.         Browsable(true),
  3.         ReadOnly(false),
  4.         Bindable(false),
  5.         DefaultValue(5000), /* DefaultValue is only for Designer. Does not actually set value of property.*/
  6.         DesignOnly(false),
  7.         Description("UDP port for the client")]
  8.         public int ClientPort
  9.         {
  10.             get { return (int)nudListeningPort.Value; }
  11.             set { nudListeningPort.Value = (decimal)value; }
  12.         }
  13.  
  14.  
  15.  
Sep 2 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

13
by: Will Pittenger | last post by:
I have a Control derived class. When the parent of the control changes the control's Location property, the stack overflows. I have not found a way to find out what was on the stack when it does...
1
by: Steven.Xu | last post by:
Hi, everyone. I am writting an user control. There has some properties on it. At the design time, the properties will disply on the property windows and user could change it's value after selected...
0
by: Joe | last post by:
I am having a hard time with setting a property on a custom server control that i am placing in a repeater. The control inherits from DropDownList. The property is being set in the repeater using...
3
by: Big Dave | last post by:
I'd like to have a description included in the tool tip (intellisense?) when I call a method from a class I wrote. Just to make sure I'm describing this correctly, I'm talking about the yellow...
7
by: Shimon Sim | last post by:
I have a custom composite control I have following property
5
by: Laurent | last post by:
Hi, I'm writing a Custom Control which have a public property named DataAdapter: <Category("Données")> _ Public Property DataAdapter() As SqlDataAdapter Get Return _dataAdapter End Get...
1
by: Jeremy Chapman | last post by:
I have a property will an array of webcontrols. The control features a custom property editor which can add and remove web controls to the array, but how do I persist the informtion by...
3
by: Allan Ebdrup | last post by:
I get the error "Error creating control: ID property is not specified" when I view my custom web control in design view. I add the control that gives an error in OnInit like this: ----- foreach...
4
by: Jeff | last post by:
hi asp.net 2.0 I have created a custom web control, here is it's header: <%@ Control Language="C#" AutoEventWireup="true" CodeFile="EditUserBox.ascx.cs" Inherits="Controls_EditUserBox" %> ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.