Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Programically nesting a repeater

Reply
Thread Tools

Programically nesting a repeater

 
 
Nikerz Inc
Guest
Posts: n/a
 
      05-22-2004
I would like to programically nest a repeater to do the following. The
tricky part is linking the data to these controls. I've been able to do
this coding the straight html which I would like to do away with because I
want to be able to change the control that appears as well.

Any help please!!!!

-----------------------------------------------------
Data 1 Radiobutton (text)
Radiobutton (text)
Radiobutton (text)
-----------------------------------------------------
Data 2 Checklist (text)
Checklist (text)
Checklist (text)
-----------------------------------------------------


Public Class MyTemplate

Implements ITemplate

Shared itemcount As Integer = 0

Dim TemplateType As ListItemType

Sub InstantiateIn(ByVal container As Control) _

Implements ITemplate.InstantiateIn

Dim lc As New Literal

lc.Text = "<br>"

AddHandler lc.DataBinding, AddressOf TemplateControl_DataBinding

itemcount += 1

container.Controls.Add(lc)

End Sub

Private Sub TemplateControl_DataBinding(ByVal sender As Object, _

ByVal e As System.EventArgs)

Dim lc As Literal

lc = CType(sender, Literal)

Dim container As RepeaterItem

container = CType(lc.NamingContainer, RepeaterItem)

lc.Text &= DataBinder.Eval(container.DataItem, "Response")

End Sub

End Class


 
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
replace tag value programically Tomas ASP .Net 1 12-01-2008 01:59 PM
Adding EventHandler to DropDownList programically dtarczynski ASP .Net 2 09-07-2006 07:32 PM
Building text box name programically sck10 ASP .Net 1 05-31-2006 02:51 AM
Module.nesting -> Kernel#nesting Trans Ruby 10 09-16-2005 12:21 AM
Programically envoking a Post Back Activitiy Paul Perot ASP .Net 6 12-09-2003 12:51 PM



Advertisments