By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,016 Members | 2,265 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,016 IT Pros & Developers. It's quick & easy.

Set a default property in a user control?

P: n/a
I'm not even sure if what I'm doing is possible. I created a simple control that will be reused throughout the site. It will accept a large amount of HTML with bulleted lists, et

I want to implement like

<uc1:KeyFeatures id="KeyFeatures1" runat="server"
Large amount of Inner Html content goes here between tags..
</uc1:KeyFeatures

Not like

<uc1:KeyFeatures id="KeyFeatures1" runat="server" InnerHtml="Large amount of Inner Html content goes here between tags..."></uc1:KeyFeatures

Can I do it this way? If so, is this considered the 'default' property and how do I declare this in my uc so it accepts the text between the tags?

The code is below..this is a stripped down version.

public class KeyFeatures : System.Web.UI.UserContro

protected System.Web.UI.WebControls.Label lblInnerHtml

public string InnerHtml

se

lblInnerHtml.Text = value




Nov 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
If you find can you please tell here how you do?
Iyigun
"Dave" <an*******@discussions.microsoft.com> wrote in message
news:24**********************************@microsof t.com...
I'm not even sure if what I'm doing is possible. I created a simple control that will be reused throughout the site. It will accept a large
amount of HTML with bulleted lists, etc
I want to implement like:

<uc1:KeyFeatures id="KeyFeatures1" runat="server">
Large amount of Inner Html content goes here between tags...
</uc1:KeyFeatures>

Not like:

<uc1:KeyFeatures id="KeyFeatures1" runat="server" InnerHtml="Large amount of Inner Html content goes here between tags..."></uc1:KeyFeatures>
Can I do it this way? If so, is this considered the 'default' property and how do I declare this in my uc so it accepts the text between the tags?
The code is below..this is a stripped down version.

public class KeyFeatures : System.Web.UI.UserControl
{
protected System.Web.UI.WebControls.Label lblInnerHtml;

public string InnerHtml
{
set
{
lblInnerHtml.Text = value;
}
}



Nov 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.