[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How do I extend the checkbox class and add another string property in C#?

Posted on 2007-10-19
6
Medium Priority
?
353 Views
Last Modified: 2010-04-15
I want to add more data to a checkbox. How do I extend the class and add another string property in C#?

0
Comment
Question by:jbrahy
  • 4
  • 2
6 Comments
 
LVL 22

Accepted Solution

by:
JimBrandley earned 2000 total points
ID: 20109598
You can create a new class and derive it from CheckBox. As:
public class ExtendedCheckBox : CheckBox
{
   private string mExtraString = string.Empty;
   public string ExtraString
   {
      get { return mExtraString; }
      set { mExtraString = value; }
   }
}

Jim
0
 
LVL 1

Author Comment

by:jbrahy
ID: 20109621
how do I implement that on an .aspx page? if I put that in the App_Code directory.
0
 
LVL 1

Author Comment

by:jbrahy
ID: 20109640
never mind I figured it out. thanks!
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:jbrahy
ID: 20109670
now I'm not getting the other attributes when I instance it.
0
 
LVL 1

Author Comment

by:jbrahy
ID: 20109836
nevermind, brain fart.
0
 
LVL 22

Expert Comment

by:JimBrandley
ID: 20109992
Glad it worked. Good luck.

Jim
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

834 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