简体   繁体   中英

ASP.NET Page Templates Library

I know that in Windows Form Application you can inherit a Form and in ASP.NET u can inherit a page but some big constraint exist: ASPX page is not compiled in the library.

I tried to embed a User Control in DLL but Design Time is not supported, also I tried to make a Custom Server Control but in the end you are inheriting a control not Page.

So the question is what is the way to make your own library of Template Pages that u can inherit and use in different projects with design support .

Thanks in advance

Creating Reusable Page template

Here I've shown how to Create a reusable page template . To use your template in your another website or project you have to right click on the project Add -> New Item . Add New Item dialog box will appear. You can use the Search Installed Templates option and search your template or you can click on Visual C# tab on left panel of the dialog box and find your Template .

Note : Your Template might not appear if you click on Visual C# -> Web on Add New Item dialog box. Rather you have to search it in Visual C# tab.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM