比如有usercontrol:
<%@control language="c#" classname="myusercontrol"%>
<script type="text/C#" runat="server">
protected void Page_Load(){
Lab_Test.Text="Hello world";
}
</script>
<script type="text/javascript">
function test(){}
</script>
<asp:Lable runat="server" id="Lab_Test"/>
然后在页面中不用加载
而是直接生成这个usercontrol并得到它的html代码
myusercontrol uc=new myusercontrol();
............
...............