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
MYSQL custom Sorting
2 HWIC-4ESW cards on a cisco router
want to move div tag to the far right
Local_Developmnt
Simple LDAP tutor
Remote Desktop Connections to Terminal Server are not giving me the maximum bandwidth
How to upgrade CentOs Kernel to latest version?
offline Files windows 7 ultimate
grant permissions for all functions
SQL Server 2008