2010-12-19 41 views
0

我見過像一些模板用戶控件:ASP.net模板化用戶控制

<uc:Control1 ID="Uc1" runat="server"> 
    <messagetemplate>a</messagetemplate> 
</uc:Control1> 

到目前爲止好。但是我想要做的就是將參數傳遞給控件。

<uc:Control1 ID="Uc1" runat="server"> 
    <messagetemplate> 
     <CustomAttribute="Color" Value="Green" /> 
     <CustomAttribute="Size" Value="Small" /> 
     <CustomAttribute="Param1" Value="1" /> 
    </messagetemplate> 
</uc:Control1> 

你能告訴我一個辦法嗎?

回答

1

在MSDN網站上有一個short tutorial。也許它可以幫助你一點點?