Rename your old file as .txt and bring it into the project as an existing
item.
Load the .txt file in the IDE and use it as a reference.
Load a new form, add the same type of controls to the new form that were
used in the now renamed .txt file, modify the property names of the controls
to match those in the .txt file and then copy reusable source from the .txt
file into the new form where it is needed in the .aspx or the .cs
code-behind.
-- or --
you have to write the declaration and signature for each control in the
code-behind yourself.
I think my suggested approach to rename and reuse is easier and fastest.
--
<%= Clinton Gallagher
METROmilwaukee "Regional Information Services"
NET csgallagher AT metromilwaukee.com
URL
http://clintongallagher.metromilwaukee.com/
"Thubaiti" <Th******@discussions.microsoft.com> wrote in message
news:78**********************************@microsof t.com...
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.DataIte m, "id")) %>'>
<%# Convert.ToString(DataBinder.Eval(Container.DataIte m, "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