web usercontrol和page的用法是一样。一样会有page_load onInit事件,不用担心它有多复杂。
不过需要注意的是:
onInit时,是先initial userControl,再initial page
在page_load与其它事件是先page里的后是user control的
不过需要注意的是:
onInit时,是先initial userControl,再initial page
在page_load与其它事件是先page里的后是user control的
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpcondevelopingwebformscontrols.aspor the best book around
Developing Microsoft ASP.NET Server Controls and Components
http://www.microsoft.com/mspress/books/sampchap/5728b.aspif you cannot find the book, you can download the code to study:
http://www.microsoft.com/mspress/books/companion/5728.asp#Companion%20Content