Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question about "datalist" control output manipulation

Status
Not open for further replies.

mmiram

IS-IT--Management
Feb 4, 2005
45
0
0
US
Hi all,

I just posted this question before and realized that I had "datalist" listed as "dataset". I tried deleting that post but could not. It has been that kind of day. Anyway..

I understand that if I use a datalist, it wraps the <table> tag around the code. However, I do not want the <tr> and the <td> tag that it seems to add as well. Here is what the HTML output looks like if I use a datalist

<table id="dlMailingList" cellspacing="0" headerte="" borrder="0">
<tr>
<td>
<caption> Username's Mailing Lists</caption>
<tr>
<th id="itemdelete">Click X to Delete</th> <th id="itemdescription"> <a id="dlMailingList__ctl0_lstDes" href="javascript:__doPostBack('dlMailingList$_ctl0$lstDes','')">Description</a></th>
<th id="itemcount">
<a id="dlMailingList__ctl0_lstCount" href="javascript:__doPostBack('dlMailingList$_ctl0$lstCount','')">Count</a></th>
</tr>
</td>
</tr>

In the above code, the <table> tag, the opening <tr>, <td> tags the closing </tr>, </td> tags are generated by the datalist. The other <tr>, <caption> and <th> tags are part of the ASPX page that was coded.

I do no want the opening and closing <tr><td> tags generated automatically by the datalist at all. I have a CSS that manipulates the entire look and these tags break it down. Is there any way I can manipulate the output of the datalist HTML to eliminate tags that I don't want. If not, what are my options in getting the data into the format that I want.

Thanks.
 
>>If not, what are my options in getting the data into the format that I want.


i would suggest that you use a Repeater.

Otherwise try eliminating the <tr> tags that you have coded in the ASPX file...

Known is handfull, Unknown is worldfull
 
You could also use a Control Adaptor that will allow you to alter the HTML output of any ASP.NET control.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top