G
Guest
Hi,
I have this code in my ASP.NET and I want to convert it to C# (code behind)
<asp:Repeater id="subCategoryRepeater" runat="server">
<ItemTemplate>
<ul>
<li>
<asp:HyperLink id="subCategoryHyperLink" runat="server" NavigateUrl='<%#
"subcategory.aspx?subcategoryid=" +
Convert.ToString(DataBinder.Eval(Container.DataItem, "id")) %>'>
<%# Convert.ToString(DataBinder.Eval(Container.DataItem, "name")) %>
</asp:HyperLink>
</li>
</ul>
</ItemTemplate>
</asp:Repeater>
And this is my code behind:
private void subCategoryName(SqlString categoryId) {
subcat.CategoryId = categoryId.ToSqlDecimal();
DataTable dataTable = subcat.SelectAllWcategoryIdLogic();
subCategoryRepeater.DataSource = dataTable;
subCategoryRepeater.DataBind();
}
Any help ?
thanks
I have this code in my ASP.NET and I want to convert it to C# (code behind)
<asp:Repeater id="subCategoryRepeater" runat="server">
<ItemTemplate>
<ul>
<li>
<asp:HyperLink id="subCategoryHyperLink" runat="server" NavigateUrl='<%#
"subcategory.aspx?subcategoryid=" +
Convert.ToString(DataBinder.Eval(Container.DataItem, "id")) %>'>
<%# Convert.ToString(DataBinder.Eval(Container.DataItem, "name")) %>
</asp:HyperLink>
</li>
</ul>
</ItemTemplate>
</asp:Repeater>
And this is my code behind:
private void subCategoryName(SqlString categoryId) {
subcat.CategoryId = categoryId.ToSqlDecimal();
DataTable dataTable = subcat.SelectAllWcategoryIdLogic();
subCategoryRepeater.DataSource = dataTable;
subCategoryRepeater.DataBind();
}
Any help ?
thanks