View Single Post
  #3 (permalink)  
Old February 10th, 2009, 12:34 PM
philthy philthy is offline
Authorized User
 
Join Date: Mar 2007
Location: , , Denmark.
Posts: 52
Thanks: 6
Thanked 2 Times in 2 Posts
Default

Hey Lee.

Not specifically a bulleted list. My problem is that I don't get any output from the Tag ObjectDataSource at all. For instance, I tried putting in a ListView, and hooking that up to the ObjectDataSource (the code I posted) and this gives me no output. However, when I set a default value for an articleID in the parameter element in the ObjectDataSource, I get the tags written out for that article. So it seems that it works, but I can't get the right articleID to the ObjectDataSource. I have no idea why...
Code:
        <SelectParameters>
            <asp:Parameter Name="articleID" Type="Int32"/>   
       </SelectParameters>

Gives no output in the ListView
Code:
   <SelectParameters>
        <asp:Parameter Name="articleID" Type="Int32" DefaultValue="9"/>
      </SelectParameters>

Writes the tags from article ID = 9.
This is the ListView I tested with:
Code:
<asp:ListView ID="ListViewTags" runat="server" DataSourceID="ObjTags" ItemPlaceholderID="tags"
                                DataKeyNames="ID">
                                <LayoutTemplate>
                                    <asp:PlaceHolder runat="server" ID="tags"></asp:PlaceHolder>
                                </LayoutTemplate>
                                <ItemTemplate>
                                    <span>
                                        <asp:Label ID="Label1" CssClass="" runat="server" Text='<%# Eval("TagName") %>'></asp:Label></span>
                                </ItemTemplate>
                            </asp:ListView>
Soeren...