I assume that most of your asp.net so far have been on the declarative side of things?
First of all you need a div that ASP.net can see, I would use asp: Panel for this.
TreeView .
<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
TreeView treeView = new TreeView();
Panel1.Controls.Add(treeView);
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Test</title>
</head>
<body>
<form id="form1" runat="server">
<asp:Panel ID="Panel1" runat="server">
</asp:Panel>
</form>
</body>
</html>
, , , .FindControl( "Panel1" ) , .