Hello,
first i want to say that i'm a beginner in asp.net and c# so it's not easy for me to understand lots and lots of code. So, for my website i'm making a gridview with some data. One of those fields contains a filename. I want to be able to take the value of that field and use it to create a media player in the same row (after every row a mediaplayer playing a different file). I can create a media player with a certain url but here you have to use a variable or something. I have tried some things but with my small knowledge of asp.net i wasn't able to make it work.
Here is what I got already:
<asp:GridView ID="GridView1" runat="server" BorderStyle="None" AutoGenerateColumns="False"
DataSourceID="SqlDataSource1" AllowPaging="True" CellPadding="1"
DataKeyNames="Bestand">
<Columns>
<asp:BoundField DataField="Artiest" HeaderText="Artiest"
SortExpression="Artiest" />
<asp:BoundField DataField="Lied" HeaderText="Lied" SortExpression="Lied" />
<asp:BoundField DataField="Album" HeaderText="Album" SortExpression="Album" />
<asp:BoundField DataField="Genre" HeaderText="Genre" SortExpression="Genre" />
<asp:BoundField DataField="Gebruikersnaam" HeaderText="Gebruikersnaam"
SortExpression="Gebruikersnaam" />
<asp:BoundField DataField="Bestand" HeaderText="Bestand"
SortExpression="Bestand" ReadOnly="True" />
<asp:TemplateField HeaderText="Beluister"><ItemTemplate>Mediaplayer here (can't submit links on this forum yet) </ItemTemplate></asp:TemplateField>
<%--<asp:CommandField ShowDeleteButton="True" />--%>
<asp:TemplateField><ItemTemplate>
<asp:LinkButton ID="LinkButton1" Runat="server" OnClientClick="return confirm('Are you sure you want to delete this record?');"
CommandName="Delete">Verwijder</asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField><ItemTemplate><button type="button" onclick="Verplaats">Keur Goed</button> </ItemTemplate></asp:TemplateField>
</Columns>
</asp:GridView>
first i want to say that i'm a beginner in asp.net and c# so it's not easy for me to understand lots and lots of code. So, for my website i'm making a gridview with some data. One of those fields contains a filename. I want to be able to take the value of that field and use it to create a media player in the same row (after every row a mediaplayer playing a different file). I can create a media player with a certain url but here you have to use a variable or something. I have tried some things but with my small knowledge of asp.net i wasn't able to make it work.
Here is what I got already:
<asp:GridView ID="GridView1" runat="server" BorderStyle="None" AutoGenerateColumns="False"
DataSourceID="SqlDataSource1" AllowPaging="True" CellPadding="1"
DataKeyNames="Bestand">
<Columns>
<asp:BoundField DataField="Artiest" HeaderText="Artiest"
SortExpression="Artiest" />
<asp:BoundField DataField="Lied" HeaderText="Lied" SortExpression="Lied" />
<asp:BoundField DataField="Album" HeaderText="Album" SortExpression="Album" />
<asp:BoundField DataField="Genre" HeaderText="Genre" SortExpression="Genre" />
<asp:BoundField DataField="Gebruikersnaam" HeaderText="Gebruikersnaam"
SortExpression="Gebruikersnaam" />
<asp:BoundField DataField="Bestand" HeaderText="Bestand"
SortExpression="Bestand" ReadOnly="True" />
<asp:TemplateField HeaderText="Beluister"><ItemTemplate>Mediaplayer here (can't submit links on this forum yet) </ItemTemplate></asp:TemplateField>
<%--<asp:CommandField ShowDeleteButton="True" />--%>
<asp:TemplateField><ItemTemplate>
<asp:LinkButton ID="LinkButton1" Runat="server" OnClientClick="return confirm('Are you sure you want to delete this record?');"
CommandName="Delete">Verwijder</asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField><ItemTemplate><button type="button" onclick="Verplaats">Keur Goed</button> </ItemTemplate></asp:TemplateField>
</Columns>
</asp:GridView>