step1: HTML中注册你要的用户控件:
<%
@ Register TagPrefix
=
"
Module
"
TagName
=
"
Account
"
Src
=
"
../modules/accountmodule.ascx
"
%>
step2: 建立这个用户控件
<
Module:Account
id
=ModuleAccount
runat
="server"
>
</ Module:Account >
< asp:Button id ="SubmitButton" text ="Update Account" runat ="server" ></ asp:Button >
</ Module:Account >
< asp:Button id ="SubmitButton" text ="Update Account" runat ="server" ></ asp:Button >
step3:
protected
AccountModule ModuleAccount;
step4: 处理按钮点击事件
public
void
SubmitButton_Click(Object sender, EventArgs e)
{
//
// Process the changes to the form
//
ModuleAccount.ProcessChanges(para);
}
{
//
// Process the changes to the form
//
ModuleAccount.ProcessChanges(para);
}
转自:http://blog.csdn.net/bakerk/archive/2004/09/15/105068.aspx