.NETGURU
control question
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngcontrolscs' list.


Cameron Elliot
-- Copied from [aspngfreeforall] to [aspngcontrolscs] by Tim Musschoot <Click here to reveal e-mail address> --

Hi,
I have created a few of my own user and custom controls and have =
discovered through msdn how to created databound templated controls. =
What I would like to know is how to create a control/class similar to =
ListItem where free text can go in between the open and close tag.

ie <blah:CustomListItem value=3D"1">one</blah:CustomListItem>

How is it the the text 'one' gets assigned to the ListItem's Text =
property? Would be great if I had the source code so I could see how =
this is done.

Any suggestions welcome.
Cameron

Reply to this message...
 
    
Tuukka Haapaniemi
Hi Cameron!

The easiest way of completing this is by inheriting your class from
panel. This also gives you a very flexible solution that you can
endevelop.

<code>

namespace CustomControls
{
    public class MyTest : Panel
    {
         //set your propertiest etc. here
    }
}

</code>

Then call it from the aspx page like follows:

<code>

<%@ Register TagPrefix="Custom" Namespace="CustomControls" Assembly =
"CustomControls" %>

...

<Custom:MyTest runat=server>
    This is the inner text
</Custom:MyTest>

</code>

"Cameron Elliot" <Click here to reveal e-mail address> wrote in
news:658029@aspngcontrolscs:

[Original message clipped]

Reply to this message...
 
    
TIM ELLISON
Look at Persist... design-time attributes. These attributes are at class
level and affect where in the ASPX persistence for the class the attributes
for the class will store the values.

Off the top of my head, one is "PersistChildren(true|false)" which specifies
whether or not to have a class store its children in the persistible medium
(aspx).

Regards,

Tim Ellison
Senior Web Applications Developer,
Long and Foster Real Estate
703-359-1884
Click here to reveal e-mail address

-----Original Message-----
From: Cameron Elliot [mailto:Click here to reveal e-mail address]
Sent: Monday, May 20, 2002 4:39 PM
To: aspngcontrolscs
Subject: [aspngcontrolscs] control question

-- Copied from [aspngfreeforall] to [aspngcontrolscs] by Tim Musschoot
<Click here to reveal e-mail address> --

Hi,
I have created a few of my own user and custom controls and have =
discovered through msdn how to created databound templated controls. =
What I would like to know is how to create a control/class similar to =
ListItem where free text can go in between the open and close tag.

ie <blah:CustomListItem value=3D"1">one</blah:CustomListItem>

How is it the the text 'one' gets assigned to the ListItem's Text =
property? Would be great if I had the source code so I could see how =
this is done.

Any suggestions welcome.
Cameron
| [aspngcontrolscs] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngcontrolscs.asp = JOIN/QUIT
| http://www.asplists.com/search = SEARCH Archives

Reply to this message...
 
 
System.Web.UI.WebControls.ListItem




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification