.CS Code:
DataTable table = new DataTable();
table.Columns.Add("Name", typeof(string));
table.Columns.Add("MemberType", typeof(string));
table.Rows.Add(membername, membertype);
table.Rows.Add(memberType);
DataSet myds = new DataSet();
myds.Tables.Add(table);
test.DataSource = myds;
test.DataBind();
.ASPX Code:
<table >
<tr><td>
<asp:GridView ID="test" AutoGenerateColumns="false" runat="server" ShowHeader="false" GridLines="None">
<Columns>
asp:BoundField DataField="Name" />
<asp:BoundField DataField="MemberType" />
</Columns>
</asp:GridView></td></tr></table>
No comments:
Post a Comment