ASP.net , C#, and VB.net , and Java, and SQL

coding and testing

博客园 首页 新随笔 联系 订阅 管理

Here is one way to Overwrite a UserControl.

 

代码
public class ControlName: DropDownList / Image / button / .......

{

     protected override void OnInit(EventArgs e)

     {

        if (!DesignMode){       ........................   }

        base.OnInit(e).

     }

}
web.config for imagrate the Class Library Project into website. 
    <pages validateRequest="false" enableEventValidation="false" viewStateEncryptionMode="Never" enableViewStateMac="false" styleSheetTheme="Theme1">
      <namespaces>
        <add namespace="**************"/>
      </namespaces>
      <controls>        <add tagPrefix="****" namespace="*********" assembly="********"/>      </controls>
      <tagMapping>
      </tagMapping>
    </pages>

 

 

posted on 2010-06-12 09:56  mr liao  阅读(227)  评论(0编辑  收藏  举报