Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Custom HTML Control Tags - Lets Try Again :)

Reply
Thread Tools

Custom HTML Control Tags - Lets Try Again :)

 
 
Tarun Mistry
Guest
Posts: n/a
 
      02-10-2006
Hi all, firstly appologies for the earlier stupid post.

Ok, I am using a repeater to make a table. This will be used to allow the
user to select a particular object (the table displays the contents of an
ArrayList of objects).

I would like todo this by selecting a radio button applied on each row of my
repeater. Quick example below, the "o" = a radio button.

| Name
----------
o | James
o | David
o | Bob

How do i make dynamic HTML controls? Or do i need to use manul HTML here?

I.e. i cant put the following code in my itemTemplate:

<asp:RadioButton ID="<% DataBinder.Eval(Container.DataItem, "NameID")%>"
runat="server" GroupName="objects" />

Any pointers would be appreciated!

Thanks,
Taz


 
Reply With Quote
 
 
 
 
krishna.bitla@gmail.com
Guest
Posts: n/a
 
      02-10-2006
Hi Taz,

You can create and add the controls dyamically to your web application.
Use the below example.

Create a table and add the table to the form. Get the handle of the
table from code behind file. Add radio button control to the table
dymically

Assume hTable is the Name of the HtmlTable

Dim htmlRow as New HtmlRow
Dim htmlColumn as New HtmlColumn

Dim rdButton as New RadioButton
rdButton.ID = "ID"
rdButton.Value = "Value"

htmColumn.Controls.Add(rdButton)
htmlRow.Columns.Add(htmlColumn)
hTable.Rows.Add(htmlRow)

 
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
JSP Custom Tags as attribute values for other custom tags Dave Java 0 08-14-2006 02:21 PM
lets try and clear the confusion Martin Spencer-Ford Computer Security 2 02-09-2006 05:08 AM
Try, Try, Try, again... Rick12N4@netscape.net Computer Support 3 01-29-2005 04:02 PM
Custom Tags within Custom Tags. Ranganath Java 2 10-21-2003 06:14 AM
Lets's try that again (Was: Playstation modchip installers) Salty Dog NZ Computing 8 08-06-2003 07:46 PM



Advertisments