Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to set value of entity NBSP into a string?
Message
From
26/11/2006 03:59:19
 
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01169162
Message ID:
01172455
Views:
20
This message has been marked as a message which has helped to the initial question of the thread.
Dmitry,

>Ok, Bonnie, you asked for it <g>. Watch out, here comes a very newbie question <g>.

LOL! No problem, Dmitry. We were all newbies at one time. <s>

Here's something I've written in the past to answer this type of question. It's for WinForms, but the same applies to WebForms pretty much:

Basically, you'll want a class library that contains your sub-classed UI controls, like textbox, button, etc. Something like this:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

namespace MyCompany.WinUI.MyClasses
{
	public class MyComboBox : System.Windows.Forms.ComboBox
	{
		// code here
	}

	public class MyTextBox : System.Windows.Forms.TextBox
	{
		// code here
	}

	public class MyButton : System.Windows.Forms.Button
	{
		// code here
	}
}
That's it. These controls can't be sub-classed visually, but as you can see, it's easy enough to do it in code. I have all the basic controls sub-classed in one class library file. Once they're added to the ToolBox, then can be dragged onto any design surface in the IDE.

~~Bonnie



>Ok, Bonnie, you asked for it <g>. Watch out, here comes a very newbie question <g>. Say, I have a web project, MyProject and I want to create my class library (I am using VFP terminology, so please forgive me) of commonly used controls (e.g dropdownlist, textbox) based on the .NET classes. What do I add to my project, a class? Or maybe you remember a thread or a link that explains how to do it?
>
>Thank you.
>
>>The cool thing is, Dmitry, is that you can start off with sub-classes with nothing in them and add the features you feel you'll need as you learn more. If you've already sub-classed your basic controls and used those sub-classed controls on your Forms already, then you'll have nothing to change when you start adding additional functionality to your sub-classes.
>>
>>~~Bonnie
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform