母版页invoice_master:
<asp:Content ID= "Content1 " ContentPlaceHolderID= "ContentPlaceHolder1 " Runat= "Server ">
<script language = "javascript ">
function GetTotal()
{
docoment.all[ "tbxTotal "].value = docoment.all[ "tbxSubTotal1 "].value;
}
</script>
<div style= "height:40px; ">
<asp:textbox runat= "server " id= "tbxSubTotal1 " onTextChanged= "GetTotal "> </asp:textbox> </div>
<div> <asp:textbox runat= "server " id= "tbxTotal " > </asp:textbox> </div>
</asp:content>
编译出错:
“GetTotal”不是“ASP.masterpages_invoice_master”的成员。
------解决方案--------------------------------------------------------
在page_load裡:
tbxSubTotal1.Attributes.Add( "onTextChanged ", "GetTotal() ");