I feel good. I just turned around.
This method is more convenient for development, but one major problem is that it has lost the features of SharePoint and cannot customize its own portal. It is more formal to develop webpart :)
From: http://hi.baidu.com/hunterzou/blog/item/ef002bb10f4fc75008230225.html
First: copy the generated DLL to the bin folder under the website directory.
Second, add the following to the <safecontrols> </safecontrols> node in the web. config file of the website (the purpose is to set the applicationProgramRegister as a security type)
<Safecontrol Assembly = "webinmoss, version = 1.0.0.0, culture = neutral, publickeytoken = NULL" namespace = "webinmoss" typename = "*" Safe = "true"/>
Note: webinmoss is the namespace of the application.
Third, delete the autoeventwireup = "true" attribute of the page.
Fourth: <SharePoint> node of the web. config file, in <pageparserpaths> </pageparserpaths>
Add a virtual path under the node <pageparserpath virtualpath = "/*" compilationmode = "always" allowserversidescript = "true" includesubfolders = "true"/>
Declare that all files on the site Allow server events. You can also specify the folder where the virtual directory is, but the value must be ~ // Or/, and must end with a file name or.
(To allow running of server-side events)
Fifth, set the enablesessionstate attribute of the web. config file to true (if the application wants to use session)
<Pages enablesessionstate = "false" enableviewstate = "true" enableviewstatemac = "true" validaterequest = "false"
Pageparserfiltertype = "Microsoft. Sharepoint. applicationruntime. sppageparserfilter, Microsoft. Sharepoint, version = 12.0.0.0, culture = neutral,
Publickeytoken = 71e9bce111e9429c "asynctimeout =" 7 ">
sixth point: on the website Web. add the following to the node of the config file (to allow applications to use User Controls)
Note: pages is the document library where the user control is located