ASP 2.0
Asp 2 configuration (appsettings, health monitoring etc)
Compilation
- Publish Website (or aspnet_compiler.exe -p c:\src -v /myvirtual).
- Aspx markup is compiled by default. Use -u (updateable) so aspx/ascx not compiled.
- New dll names are created by default. Use -fixednames.
- One dll per page by default. Use WDP aspnet_merge.exe to make one dll per folder (or -o for one dll to rule them all).
Expressions
| Expression | When | Use |
|---|---|---|
| %= value % | Render | Not in %asp: server controls. |
| %# value % | After DataBind only | Can be in %asp: server controls. See here |
| %$ value % | PreInit | The Expression Builders: AppSettings:, ConnectionStrings: and Resources: Can be in %asp: server controls. |
Event Validation
Master Pages
URL Rebasing is a problem. Use <img src="<%= ResolveClientUrl("imgs/tab2.gif") %>"
Themes and Skins
Problems with themes:
- All the css files are automatically linked in- you can't do conditional stylesheet links for specific browsers or section of the site
- Themed images are supposed to have a SkinId, and the skin file contains as asp:Image.
- With authorization, your login page can be unstyled. You have to allow users="*" (in web.config location, or create an AppThemes/web.config)
- Enumerating themes is not obvious (foreach thru HostingEnvironment.VirtualPathProvider.GetDirectory("~/App_Themes").Directories )
- With precompiled websites, you can't change the theme in web.config. You have to recompile. Doh!
Membership Providers
- Oracle Membership provider for asp2 vb with the table schema in comments
- Simple asp2 providers
- Simple membership provider with NHibernate