Microsoft
Software
Hardware
Network
Question : How do i bind List<String> to GridView
How do i bind string array to gridview
//Code
string[] myKewords = {"One","Two","Three"};
List<String> keywords = new List<String>(MyKeywords.Sp
lit(','));
gdvKeywords.DataSource = keywords;
gdvKeywords.DataBind();
//HTML
<asp:GridView ID="gdvKeywords" runat="server" AutoGenerateColumns="false
">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<%# Eval("Keyword") %>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
I don't know how to bind?
thanks in advance
Answer : How do i bind List<String> to GridView
HTML
--------
<asp:GridView ID="gdvKeywords" runat="server" AutoGenerateColumns="true"
>
</asp:GridView>
Code
--------
string[] MyKeywords = { "One", "Two", "Three" };
gdvKeywords.DataSource = MyKeywords;
gdvKeywords.DataBind();
Random Solutions
Code Freezes With No Error
deleting the last row of data programatically before importing data
Basic SharePoint 2010 Workflow
exchange 2003
div tags
Need media/download link for Office 2010 Professional OEM
VBA Splitting a line with a comma seperator and quote qualifer
configure samba access to SBS 2008 folders?
HTA code that can list all softwares in a machine and have a small box to enter comments in them.
Advanced DNS