VisualWebDeveloper2005ExpressEdition
CheatSheet:ASP.
NETBasics
ASP.NETSpecialFolders
BinContainsassembliesusedbythe
webapplicationApp_CodeC#or
VBsourcecodethatiscommontothewebsite.Utilityclasses,modulesBasePagesetc.App_DataSQLExpressdatabasesusedbythewebsite.App_GlobalResourcesResourcessharedacrossallpagesandcontrols.App_LocalResourcesResourcesspecict
oapageorcontrolApp_WebReferencesReferencestowebservicesApp_ThemesContains.skin,.cssandimagelesusedforthethemesofthesite.App_BrowsersOptional.browsercapabilitiesles.
MarkupandCodeinaSingleFile
MarkupandCodeinSeparateFiles."codebehindmodel"
<%@PageLanguage="C#"ClassName="Page1_aspx"Inherits="Page1"CodeFile="Page1.aspx.cs"%>
CommonPageandControlDirectives
<%@<%@<%@<%@<%@<%@<%@<%@PagePagePagePageLanguage="C#"Language="VB"Language="C#"Language="VB"
%>%>CodeFile="Page1.ascx.cs"Inherits="Control1"%>CodeFile="Page1.ascx.vb"Inherits="Control1"%>%>%>CodeFile="Page1.ascx.cs"Inherits="Control1"%>CodeFile="Page1.ascx.vb"Inherits="Control1"%>
ControlControlControlControl
Language="C#"Language="VB"Language="C#"Language="VB"
<%@RegisterTagPrex="uc1"TagName="Control1"Src="Control1.ascx"%><%@RegisterTagPrex="lvs"Namespace="Lvs.Web.UI"Assembly="Lvs.Web"%><%@ImportNamespace="System.Data"%><%@OutputCacheDuration="60"VaryByParam="none"%><%@OutputCacheLocation="Server"VaryByParam="param1;param2"Duration="60"%><%@OutputCacheLocation="None"NoStore="true"%>
CodeBlocks
InlinecodeblockInlinerenderblockDatabindingexpressionblockExpressionblockPagelevelcode.Methods,properties,variableandeventhandlers.
<%Response.Write("HelloWorld");%><%=string.Format("2+2={0}",2+2);%><%#Container.ItemIndex%><%$Resources:String,Hello%>
Resources
Strings.resxStrings.es-MX.resx
protectedvoidPage_Load(objectsender,EventArgse){Label1.Text=Resources.Strings.Hello;}xml:namespace prefix = asp />
Default.aspx.resx
Default.aspx.es-MX.resx