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
Word doesn't open file that's setup with VB- error: could not load some objects because they are not available on this machine
User_Segments
Order by within order by
What is the netstat -an port BOUND state?
I removed the cmos battery from a dell power edge 2650
Disable Apache documentation and Mailman on my shared plesk hosting account
How can I close a splash screen during the main form's Load event?
What is the maximum safe temperature for a non-running computer?
Syntax Error
VPN conection