Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Set a default property in a user control?

Reply
Thread Tools

Set a default property in a user control?

 
 
=?Utf-8?B?RGF2ZQ==?=
Guest
Posts: n/a
 
      05-14-2004
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










 
Reply With Quote
 
 
 
 
Iyigun Cevik
Guest
Posts: n/a
 
      05-17-2004
If you find can you please tell here how you do?
Iyigun


"Dave" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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;
> }
> }
>
>
>
>
>
>
>
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
<value> could not be set on property <property name> TonyDyer General Computer Support 0 02-14-2012 03:25 PM
Set CSS property equal to another CSS property? Noozer HTML 10 10-13-2004 09:20 PM
Can you set a default property for a user control? Dave ASP .Net Building Controls 0 05-14-2004 02:01 PM
Is there a way to set the a CSS property to be explicitly the same as another CSS property? Joshua Beall HTML 1 12-10-2003 07:21 PM
'property value' could not be set on property 'propertyname' KJ ASP .Net Web Controls 0 08-26-2003 06:08 PM



Advertisments