views:

19

answers:

0

Hi guys,

I'm trying to generate the following html:

<ul class="listItems">
 <li class="Selected">Val1</li>
 <li>Val2</li>
 <li>Val3</li>
 <li>Val4</li>
 <li>Val5</li>
</li>

I thought of using a ListView and customize its ItemTemplate.

<ItemTemplate>
  <li>
     <asp:LinkButton Text='<%#Eval("BoundItemField")%>' CommandName="Select" runat="server"/>
  </li>
</ItemTemplate>

When an item is selected I must populate with the selected item data a series of fields.

The only problem with this approach is that I believe it's to complicated. I now need to handle setup all the data so that the SelectedIndexChanged event fires with proper values.

Can this be achieved in some other way ? Perhaps simpler... Also when I select one of the items and the list scroll is not kept on postback. Does anyone have any idea how can I keep the current scroll position between postbacks >

I'm using ASP with .net 3.5. So I also have access to the web extensions if needed.

Coding Heroes PLEASE embrace this question!