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
0xc004e003 error code activation problems windows 7
Can I create a Region in SQL Server similar to C#
sql server udp port
MS Access Trim function
Update FoxPro Tables
differences between HDD Sentinel and S.M.A.R.T. readings
regex move command in Ubuntu, how would I move the following files to a directory?
Data Back Up proceedures\processes
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/runningp/public_html
/members/t
est.php on line 42
IE 8 Search Provider box search button does nothing