Dynamic rich media component for ASP.Net Flash, Video, Audio, FlashVideo and ToolTip / Balloon Help controls for C# and VB.Net
Welcome Guest Search | Active Topics | Members | Log In | Register

playlist song name Options · View
Guest
Posted: Friday, June 06, 2008 7:49:18 PM
Rank: Guest
Groups: Guest

Joined: 7/20/2007
Posts: 53,654
Points: 100,812
The playlist displays the path name as in ~\music\ song.mp3. I want to display just the song name, not the path; is there a way to display just the song title within the playlist?
Dave
Posted: Friday, June 13, 2008 8:35:39 AM
Rank: Administration
Groups: Administration

Joined: 7/20/2007
Posts: 302
Points: -2,494
Location: Primarily in New York, USA
The PlayList control is built off the ASP.NET GridView, and fully supports templating. Please edit the template however you like.

For example, here is the default template that is generated when you drag the control onto your webform:

Code:
<asp:TemplateField ShowHeader="False">
<itemtemplate>
<asp:LinkButton ID="TrackSelectButton" runat="server" CausesValidation="False" CommandName="Select" Text='<%# Eval("URL") /*Eval("TrackNumber")+". "+Eval("Name")*/ %>'></asp:LinkButton>
</itemtemplate>
</asp:TemplateField>


You can make this content be whatever you like. Noticed that I've commented some code in there - if you want the Name to show and not the URL, it should be something similar to this:

Code:
<asp:TemplateField ShowHeader="False">
<itemtemplate>
<asp:LinkButton ID="TrackSelectButton" runat="server" CausesValidation="False" CommandName="Select" Text='<%# Eval("Name") %>'></asp:LinkButton>
</itemtemplate>
</asp:TemplateField>


The databinding names here (within the Eval statements) link to the default playlist data source. If you're loading playlist data from a database, the Eval("Name") should be changed to Eval("YOUR_DATABASE_NAME_COLUMN").

Let me know how you do.
Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.