Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > Repeater control in a rendered custom control

Thread Tools

Repeater control in a rendered custom control

Posts: n/a
I have created a custom control that puts a html wrapper around some

so <myc:cPanel ...>more html</myc:cPanel> will draw a html table which
contains the code between the tags.

basicaly all I did was override the render method and appended html to
the top and bottom of the existing output like so

protected override void Render(HtmlTextWriter output)

No from this I want to derive another control that will encapsulate a
repeater control in the same html wrapper. So what I would have on
screen would be a html panel with a databound repeater as its content
and simply takes a datasource as property.

Any ideas how I would go about doing this? I would I be able to fix
the template within my control?

or would it be better to just drive my class from the repeater control
and as before append the html wrapper to the output.

What I am trying to do is build up a suite of web controls that draw
portal type panels with specific content. So a panel with a tree
control for menu, another one with a repeater in it showing news
articles, and other one with no content specified.. another one for
ads,i.e single image and a button etc

I have done the basic one which I have mentoined above.. which allows
me to put any content in the panel and also the Add one.

I could just do this

<myc:cPanel ...>
</myc:cPanel ...>

every time I want to add the panel.. but what I want to be able to do
<myc:cPanel DataSource=newsDataSet ...></myc:cPanel ...> and get the
same result.

Reply With Quote

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
Custom User Control is not rendered inside another user control in a server table. Leeor Chernov ASP .Net 2 10-16-2005 08:35 AM
Custom control and Rendered HTML Tag =?Utf-8?B?SSBhbSBTYW0=?= ASP .Net 0 06-01-2005 12:34 AM
Keep custom property-value in custom rendered control Rob Joosen ASP .Net Building Controls 0 05-12-2004 11:56 AM
Image rendered from a custom control bobben ASP .Net Web Controls 1 02-06-2004 08:33 AM
ControlDesigner not invoked on custom control when control is rendered within another custom control Matt Sokol ASP .Net Building Controls 2 08-07-2003 07:13 AM