使用Web窗体

引言

前段时间客户A突然提出,B项目希望可以做成BS形式的,之前是CS的,因为我之前也没学过ASP.NET,于是一边百度,一边Coding,马马虎虎的把功能流程给调通,然后就交差了,想着闲下来再系统地学习一下ASP.NET。最近,有新接手一个项目,优势设计ASP.NET的,一边写一边百度,写着写着发现首先对于什么时候用服务器控件,什么时候用可编程html元素等细化的东西始终没有清晰的认识,总是挑实现简单的写,结果心里很没有底,终于狠下心来从头认真的学习一下ASP.NET.

开始前的准备

创建Web Form项目

使用ASP.NET EMPTY WEB APPLICATION模板新建一个Visual Studio项目:

在项目上右键-Add-New Item选择Web模板中的Web Form项目,这里会创建3个文件,第一个是Web窗体本身,他的扩展名为Aspx,文件内容如下:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebForm.Default" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div> </div>
</form>
</body>
</html>

  

第二个文件为代码隐藏类,扩展名cs,他默认以与其关联的Web窗体来命名,文件内容如下:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls; namespace WebForm
{
public partial class Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{ }
}
}

最后一个文件为设计器文件,扩展名designer.cs---可视化设计工具需要使用该文件(因为在实际操作中,我们不需要对该文件进行任何修改,因此这里不对其中内容进行贴图)。

代码片段,可编程HTML元素和控件

代码片段指放置在<%与%>标签之间的C#表达式,有各种不同的代码片段可供使用:

以上为Pro ASP.NET 4.5 IN C# 第十二章的截图。

对于标准代码片段<%,内容代码片段<%=,数据绑定代码片段<%#,以及指令由于较为常用,下面只对属性代码片段进行举例说明:

在Web.Config文件中添加配置元素

<?xml version="1.0" encoding="utf-8"?>

<!--
有关如何配置 ASP.NET 应用程序的详细信息,请访问
http://go.microsoft.com/fwlink/?LinkId=169433
--> <configuration>
<system.web>
<compilation debug="true" targetFramework="4.5.1" />
<httpRuntime targetFramework="4.5.1" />
</system.web>
<appSettings>
<add key="title" value="touha's first web form"/>
</appSettings>
</configuration>

修改web窗体文件,读取前面定义的title属性的值:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebForm.Default" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title> <asp:Literal ID="Literal1" runat="server" Text="<%$ AppSettings:title%>" /></title>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>

注意:属性代码片段必须放在Literal控件中,否则将提示如下错误

关于其详细用法,请参考:https://msdn.microsoft.com/zh-cn/library/d5bd1tad(VS.80).aspx

对于可编程HTML元素,这里暂时不做讲解。

控件是属于ASP.NET很大的一块,她是用于生成HTML片段的可重用的功能块,可分为:用户控件,服务器控件以及内置控件,本节不做叙述,后面会对其将会深入讨论之。

aspx web窗体最后究竟会生成怎样一个C#类

查看Windows7 和 Window8 上的c:\Users\<userName>\AppData\Local\Temp\Temporary ASP.NET Files目录(注意AppData默认为隐藏),下面贴出代码:

//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.34209
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------ [assembly: System.CodeDom.Compiler.GeneratedCodeAttribute("ASP.NET", "4.0.30319.34274")]
[assembly: System.Security.SecurityRulesAttribute(System.Security.SecurityRuleSet.Level2)]
[assembly: System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.5.1")] namespace @__ASP { internal class FastObjectFactory_app_web_yc3poujj { #line 1 "c:\\dummy.txt" #line default
#line hidden private FastObjectFactory_app_web_yc3poujj() {
} static object Create_ASP_default_aspx() {
return new ASP.default_aspx();
}
}
}
#pragma checksum "c:\users\tangbo\documents\visual studio 2012\Projects\WebForm\WebForm\Default.aspx" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "FF4B8FBE55EE3CCAF50519550FD9CA46EAB26B31"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.34209
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------ namespace ASP { #line 392 "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config"
using System.Linq; #line default
#line hidden #line 399 "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config"
using System.Web.Security; #line default
#line hidden #line 390 "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config"
using System.ComponentModel.DataAnnotations; #line default
#line hidden #line 388 "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config"
using System.Collections.Generic; #line default
#line hidden #line 394 "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config"
using System.Text.RegularExpressions; #line default
#line hidden #line 8 "c:\users\tangbo\documents\visual studio 2012\Projects\WebForm\WebForm\Default.aspx"
using System.Web.UI.WebControls; #line default
#line hidden #line 405 "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config"
using System.Xml.Linq; #line default
#line hidden #line 8 "c:\users\tangbo\documents\visual studio 2012\Projects\WebForm\WebForm\Default.aspx"
using System.Web.UI; #line default
#line hidden #line 404 "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config"
using System.Web.UI.HtmlControls; #line default
#line hidden #line 395 "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config"
using System.Web; #line default
#line hidden #line 391 "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config"
using System.Configuration; #line default
#line hidden #line 386 "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config"
using System; #line default
#line hidden #line 393 "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config"
using System.Text; #line default
#line hidden #line 400 "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config"
using System.Web.Profile; #line default
#line hidden #line 396 "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config"
using System.Web.Caching; #line default
#line hidden #line 387 "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config"
using System.Collections; #line default
#line hidden #line 8 "c:\users\tangbo\documents\visual studio 2012\Projects\WebForm\WebForm\Default.aspx"
using System.Web.UI.WebControls.WebParts; #line default
#line hidden #line 8 "c:\users\tangbo\documents\visual studio 2012\Projects\WebForm\WebForm\Default.aspx"
using System.Web.UI.WebControls.Expressions; #line default
#line hidden #line 389 "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config"
using System.Collections.Specialized; #line default
#line hidden #line 398 "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config"
using System.Web.SessionState; #line default
#line hidden #line 8 "c:\users\tangbo\documents\visual studio 2012\Projects\WebForm\WebForm\Default.aspx"
using System.Web.DynamicData; #line default
#line hidden
using Microsoft.VisualStudio.Web.PageInspector.Runtime.WebForms; [System.Runtime.CompilerServices.CompilerGlobalScopeAttribute()]
public class default_aspx : global::WebForm.Default, System.Web.SessionState.IRequiresSessionState, System.Web.IHttpHandler { #line 8 "c:\users\tangbo\documents\visual studio 2012\Projects\WebForm\WebForm\Default.aspx"
protected global::System.Web.UI.WebControls.Literal Literal1; #line default
#line hidden private static bool @__initialized; private static object @__fileDependencies; [System.Diagnostics.DebuggerNonUserCodeAttribute()]
public default_aspx() {
string[] dependencies;
((global::WebForm.Default)(this)).AppRelativeVirtualPath = "~/Default.aspx";
if ((global::ASP.default_aspx.@__initialized == false)) {
dependencies = new string[];
dependencies[] = "~/Default.aspx";
global::ASP.default_aspx.@__fileDependencies = this.GetWrappedFileDependencies(dependencies);
global::ASP.default_aspx.@__initialized = true;
}
this.Server.ScriptTimeout = ;
} protected System.Web.Profile.DefaultProfile Profile {
get {
return ((System.Web.Profile.DefaultProfile)(this.Context.Profile));
}
} protected System.Web.HttpApplication ApplicationInstance {
get {
return ((System.Web.HttpApplication)(this.Context.ApplicationInstance));
}
} [System.Diagnostics.DebuggerNonUserCodeAttribute()]
private global::System.Web.UI.LiteralControl @__BuildControl__control2() {
global::System.Web.UI.LiteralControl @__ctrl;
@__ctrl = new global::System.Web.UI.LiteralControl("\r\n\r\n<!DOCTYPE html>\r\n\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n");
@__ctrl.SetTraceData(typeof(Microsoft.VisualStudio.Web.PageInspector.Runtime.WebForms.TraceData), new Microsoft.VisualStudio.Web.PageInspector.Runtime.WebForms.TraceData(, , true));
return @__ctrl;
} [System.Diagnostics.DebuggerNonUserCodeAttribute()]
private global::System.Web.UI.HtmlControls.HtmlMeta @__BuildControl__control4() {
global::System.Web.UI.HtmlControls.HtmlMeta @__ctrl; #line 7 "c:\users\tangbo\documents\visual studio 2012\Projects\WebForm\WebForm\Default.aspx"
@__ctrl = new global::System.Web.UI.HtmlControls.HtmlMeta(); #line default
#line hidden #line 7 "c:\users\tangbo\documents\visual studio 2012\Projects\WebForm\WebForm\Default.aspx"
((System.Web.UI.IAttributeAccessor)(@__ctrl)).SetAttribute("http-equiv", "Content-Type"); #line default
#line hidden #line 7 "c:\users\tangbo\documents\visual studio 2012\Projects\WebForm\WebForm\Default.aspx"
@__ctrl.Content = "text/html; charset=utf-8"; #line default
#line hidden
@__ctrl.SetTraceData(typeof(Microsoft.VisualStudio.Web.PageInspector.Runtime.WebForms.TraceData), new Microsoft.VisualStudio.Web.PageInspector.Runtime.WebForms.TraceData(, , false));
return @__ctrl;
} [System.Diagnostics.DebuggerNonUserCodeAttribute()]
private global::System.Web.UI.LiteralControl @__BuildControl__control6() {
global::System.Web.UI.LiteralControl @__ctrl;
@__ctrl = new global::System.Web.UI.LiteralControl(" ");
@__ctrl.SetTraceData(typeof(Microsoft.VisualStudio.Web.PageInspector.Runtime.WebForms.TraceData), new Microsoft.VisualStudio.Web.PageInspector.Runtime.WebForms.TraceData(, , true));
return @__ctrl;
} [System.Diagnostics.DebuggerNonUserCodeAttribute()]
private global::System.Web.UI.WebControls.Literal @__BuildControlLiteral1() {
global::System.Web.UI.WebControls.Literal @__ctrl; #line 8 "c:\users\tangbo\documents\visual studio 2012\Projects\WebForm\WebForm\Default.aspx"
@__ctrl = new global::System.Web.UI.WebControls.Literal(); #line default
#line hidden
this.Literal1 = @__ctrl; #line 8 "c:\users\tangbo\documents\visual studio 2012\Projects\WebForm\WebForm\Default.aspx"
@__ctrl.ID = "Literal1"; #line default
#line hidden
@__ctrl.Text = global::System.Convert.ToString(System.Web.Compilation.AppSettingsExpressionBuilder.GetAppSetting("title", typeof(System.Web.UI.WebControls.Literal), "Text"), global::System.Globalization.CultureInfo.CurrentCulture);
@__ctrl.SetTraceData(typeof(Microsoft.VisualStudio.Web.PageInspector.Runtime.WebForms.TraceData), new Microsoft.VisualStudio.Web.PageInspector.Runtime.WebForms.TraceData(, , false));
return @__ctrl;
} [System.Diagnostics.DebuggerNonUserCodeAttribute()]
private global::System.Web.UI.HtmlControls.HtmlTitle @__BuildControl__control5() {
global::System.Web.UI.HtmlControls.HtmlTitle @__ctrl; #line 8 "c:\users\tangbo\documents\visual studio 2012\Projects\WebForm\WebForm\Default.aspx"
@__ctrl = new global::System.Web.UI.HtmlControls.HtmlTitle(); #line default
#line hidden
global::System.Web.UI.LiteralControl @__ctrl1; #line 8 "c:\users\tangbo\documents\visual studio 2012\Projects\WebForm\WebForm\Default.aspx"
@__ctrl1 = this.@__BuildControl__control6(); #line default
#line hidden
System.Web.UI.IParserAccessor @__parser = ((System.Web.UI.IParserAccessor)(@__ctrl)); #line 8 "c:\users\tangbo\documents\visual studio 2012\Projects\WebForm\WebForm\Default.aspx"
@__parser.AddParsedSubObject(@__ctrl1); #line default
#line hidden
global::System.Web.UI.WebControls.Literal @__ctrl2; #line 8 "c:\users\tangbo\documents\visual studio 2012\Projects\WebForm\WebForm\Default.aspx"
@__ctrl2 = this.@__BuildControlLiteral1(); #line default
#line hidden #line 8 "c:\users\tangbo\documents\visual studio 2012\Projects\WebForm\WebForm\Default.aspx"
@__parser.AddParsedSubObject(@__ctrl2); #line default
#line hidden
@__ctrl.SetTraceData(typeof(Microsoft.VisualStudio.Web.PageInspector.Runtime.WebForms.TraceData), new Microsoft.VisualStudio.Web.PageInspector.Runtime.WebForms.TraceData(, , false));
return @__ctrl;
} [System.Diagnostics.DebuggerNonUserCodeAttribute()]
private global::System.Web.UI.HtmlControls.HtmlHead @__BuildControl__control3() {
global::System.Web.UI.HtmlControls.HtmlHead @__ctrl; #line 6 "c:\users\tangbo\documents\visual studio 2012\Projects\WebForm\WebForm\Default.aspx"
@__ctrl = new global::System.Web.UI.HtmlControls.HtmlHead("head"); #line default
#line hidden
global::System.Web.UI.HtmlControls.HtmlMeta @__ctrl1; #line 6 "c:\users\tangbo\documents\visual studio 2012\Projects\WebForm\WebForm\Default.aspx"
@__ctrl1 = this.@__BuildControl__control4(); #line default
#line hidden
System.Web.UI.IParserAccessor @__parser = ((System.Web.UI.IParserAccessor)(@__ctrl)); #line 6 "c:\users\tangbo\documents\visual studio 2012\Projects\WebForm\WebForm\Default.aspx"
@__parser.AddParsedSubObject(@__ctrl1); #line default
#line hidden
global::System.Web.UI.HtmlControls.HtmlTitle @__ctrl2; #line 6 "c:\users\tangbo\documents\visual studio 2012\Projects\WebForm\WebForm\Default.aspx"
@__ctrl2 = this.@__BuildControl__control5(); #line default
#line hidden #line 6 "c:\users\tangbo\documents\visual studio 2012\Projects\WebForm\WebForm\Default.aspx"
@__parser.AddParsedSubObject(@__ctrl2); #line default
#line hidden
@__ctrl.SetTraceData(typeof(Microsoft.VisualStudio.Web.PageInspector.Runtime.WebForms.TraceData), new Microsoft.VisualStudio.Web.PageInspector.Runtime.WebForms.TraceData(, , false));
return @__ctrl;
} [System.Diagnostics.DebuggerNonUserCodeAttribute()]
private global::System.Web.UI.LiteralControl @__BuildControl__control7() {
global::System.Web.UI.LiteralControl @__ctrl;
@__ctrl = new global::System.Web.UI.LiteralControl("\r\n<body>\r\n ");
@__ctrl.SetTraceData(typeof(Microsoft.VisualStudio.Web.PageInspector.Runtime.WebForms.TraceData), new Microsoft.VisualStudio.Web.PageInspector.Runtime.WebForms.TraceData(, , true));
return @__ctrl;
} [System.Diagnostics.DebuggerNonUserCodeAttribute()]
private global::System.Web.UI.LiteralControl @__BuildControl__control8() {
global::System.Web.UI.LiteralControl @__ctrl;
@__ctrl = new global::System.Web.UI.LiteralControl("\r\n <div>\r\n </div>\r\n ");
@__ctrl.SetTraceData(typeof(Microsoft.VisualStudio.Web.PageInspector.Runtime.WebForms.TraceData), new Microsoft.VisualStudio.Web.PageInspector.Runtime.WebForms.TraceData(, , true));
return @__ctrl;
} [System.Diagnostics.DebuggerNonUserCodeAttribute()]
private global::System.Web.UI.HtmlControls.HtmlForm @__BuildControlform1() {
global::System.Web.UI.HtmlControls.HtmlForm @__ctrl; #line 11 "c:\users\tangbo\documents\visual studio 2012\Projects\WebForm\WebForm\Default.aspx"
@__ctrl = new global::System.Web.UI.HtmlControls.HtmlForm(); #line default
#line hidden
this.form1 = @__ctrl; #line 11 "c:\users\tangbo\documents\visual studio 2012\Projects\WebForm\WebForm\Default.aspx"
@__ctrl.ID = "form1"; #line default
#line hidden
global::System.Web.UI.LiteralControl @__ctrl1; #line 11 "c:\users\tangbo\documents\visual studio 2012\Projects\WebForm\WebForm\Default.aspx"
@__ctrl1 = this.@__BuildControl__control8(); #line default
#line hidden
System.Web.UI.IParserAccessor @__parser = ((System.Web.UI.IParserAccessor)(@__ctrl)); #line 11 "c:\users\tangbo\documents\visual studio 2012\Projects\WebForm\WebForm\Default.aspx"
@__parser.AddParsedSubObject(@__ctrl1); #line default
#line hidden
@__ctrl.SetTraceData(typeof(Microsoft.VisualStudio.Web.PageInspector.Runtime.WebForms.TraceData), new Microsoft.VisualStudio.Web.PageInspector.Runtime.WebForms.TraceData(, , false));
return @__ctrl;
} [System.Diagnostics.DebuggerNonUserCodeAttribute()]
private global::System.Web.UI.LiteralControl @__BuildControl__control9() {
global::System.Web.UI.LiteralControl @__ctrl;
@__ctrl = new global::System.Web.UI.LiteralControl("\r\n</body>\r\n</html>\r\n");
@__ctrl.SetTraceData(typeof(Microsoft.VisualStudio.Web.PageInspector.Runtime.WebForms.TraceData), new Microsoft.VisualStudio.Web.PageInspector.Runtime.WebForms.TraceData(, , true));
return @__ctrl;
} [System.Diagnostics.DebuggerNonUserCodeAttribute()]
private void @__BuildControlTree(default_aspx @__ctrl) { #line 1 "c:\users\tangbo\documents\visual studio 2012\Projects\WebForm\WebForm\Default.aspx"
this.InitializeCulture(); #line default
#line hidden
global::System.Web.UI.LiteralControl @__ctrl1; #line 1 "c:\users\tangbo\documents\visual studio 2012\Projects\WebForm\WebForm\Default.aspx"
@__ctrl1 = this.@__BuildControl__control2(); #line default
#line hidden
System.Web.UI.IParserAccessor @__parser = ((System.Web.UI.IParserAccessor)(@__ctrl)); #line 1 "c:\users\tangbo\documents\visual studio 2012\Projects\WebForm\WebForm\Default.aspx"
@__parser.AddParsedSubObject(@__ctrl1); #line default
#line hidden
global::System.Web.UI.HtmlControls.HtmlHead @__ctrl2; #line 1 "c:\users\tangbo\documents\visual studio 2012\Projects\WebForm\WebForm\Default.aspx"
@__ctrl2 = this.@__BuildControl__control3(); #line default
#line hidden #line 1 "c:\users\tangbo\documents\visual studio 2012\Projects\WebForm\WebForm\Default.aspx"
@__parser.AddParsedSubObject(@__ctrl2); #line default
#line hidden
global::System.Web.UI.LiteralControl @__ctrl3; #line 1 "c:\users\tangbo\documents\visual studio 2012\Projects\WebForm\WebForm\Default.aspx"
@__ctrl3 = this.@__BuildControl__control7(); #line default
#line hidden #line 1 "c:\users\tangbo\documents\visual studio 2012\Projects\WebForm\WebForm\Default.aspx"
@__parser.AddParsedSubObject(@__ctrl3); #line default
#line hidden
global::System.Web.UI.HtmlControls.HtmlForm @__ctrl4; #line 1 "c:\users\tangbo\documents\visual studio 2012\Projects\WebForm\WebForm\Default.aspx"
@__ctrl4 = this.@__BuildControlform1(); #line default
#line hidden #line 1 "c:\users\tangbo\documents\visual studio 2012\Projects\WebForm\WebForm\Default.aspx"
@__parser.AddParsedSubObject(@__ctrl4); #line default
#line hidden
global::System.Web.UI.LiteralControl @__ctrl5; #line 1 "c:\users\tangbo\documents\visual studio 2012\Projects\WebForm\WebForm\Default.aspx"
@__ctrl5 = this.@__BuildControl__control9(); #line default
#line hidden #line 1 "c:\users\tangbo\documents\visual studio 2012\Projects\WebForm\WebForm\Default.aspx"
@__parser.AddParsedSubObject(@__ctrl5); #line default
#line hidden
} [System.Diagnostics.DebuggerNonUserCodeAttribute()]
protected override void FrameworkInitialize() {
base.FrameworkInitialize();
this.@__BuildControlTree(this);
this.AddWrappedFileDependencies(global::ASP.default_aspx.@__fileDependencies);
this.Request.ValidateInput();
} [System.Diagnostics.DebuggerNonUserCodeAttribute()]
public override int GetTypeHashCode() {
return ;
} [System.Diagnostics.DebuggerNonUserCodeAttribute()]
public override void ProcessRequest(System.Web.HttpContext context) {
base.ProcessRequest(context);
}
}
}

从上面代码,可以看出,aspx Web窗体文件生成的类实现了IHttpHandler接口,并且继承了其对应的代码隐藏类文件,另外我们之前加的Literal控件也作为其成员

下面的代码,显示了属性代码片段的实际工作原理

通过Page.FrameworkInitialize方法,可以看出,其主要通过@__BuildControlTree方法,初始化控件树。

总结语

本章对于Web窗体,及其工作原理做了一个粗略的介绍。

ASP.NET4.5从零开始(1)的更多相关文章

  1. ASP.NET MVC 从零开始 - 自动化部署(其二)

    这篇文章是从我的 github 博客 http://lxconan.github.io 导入的. 这是这个系列的第五篇了,前四篇请参见: ASP.NET MVC 从零开始 – Create and R ...

  2. ASP.NET MVC 从零开始 - 请求处理

    这篇文章是从我的 github 博客 lxconan.github.io 导入的. 这是这个系列的第三篇了.前两篇文章请参见: ASP.NET MVC 从零开始 - Create and Run AS ...

  3. ASP.NET MVC 从零开始 - 自动化部署(其一)

    本文是从我的 github 博客 http://lxconan.github.io 导入的. 这是这个系列的第四篇了,前三篇请参见: ASP.NET MVC 从零开始 – Create and Run ...

  4. ASP.NET4.5Web API及非同步程序开发系列(2)

    认识ASP.NET WEB API 他的前身为WCF WEB API用于协助WCF支持RestFul.现在集成进ASP.NET,正式更名为ASP.NET WEB API,ASP.NET Web API ...

  5. 转:通过代码理解Asp.net4中的几种ClientIDMode设置.

    转:http://www.cnblogs.com/xray2005/archive/2011/07/05/2097881.html 以前我们可以通过ClientID在JavaScript脚本中服务器端 ...

  6. ASP.NET4.0新特性

    原文:ASP.NET4.0新特性 在以前试用VS2010的时候已经关注到它在Web开发支持上的一些变化了,为此我还专门做了一个ppt,当初是计划在4月12日那天讲的,结果因为莫名其妙的原因导致没有语音 ...

  7. ASP.NET4.5Web API及非同步程序开发系列3

    ASP.NET4.5Web API及非同步程序开发系列(3) 接着上一篇博客的内容做一个补充,正好是一个大哥提出来的,我们看看一个有趣的现象. 请求相关问题的补充: 我们先在Controller中的定 ...

  8. ASP.NET4.5Web API及非同步程序开发系列

    ASP.NET4.5Web API及非同步程序开发系列 认识ASP.NET WEB API 他的前身为WCF WEB API用于协助WCF支持RestFul.现在集成进ASP.NET,正式更名为ASP ...

  9. VS2012打开项目 提示Asp.net4.5未在web服务器上注册

    在用vs2012代开项目时,没回都显示Asp.net4.5未在web服务器上注册,最后是由于没有下载一个补丁的原因,只需要下载安装补丁 VS11-KB3002339.exe ,下载地址:https:/ ...

随机推荐

  1. 27.solr集群

    搭建solr集群整个架构: 前提: (1)zookeeper集群 (2)最好做系统间拷贝免密码(频繁复制东西输密码太麻烦) (3)软件solr.*.zip  zookerper.*.tar.gz  i ...

  2. Sprint第三阶段(第四天12.12)

  3. Making my own Autonomous Robot in ROS / Gazebo, Day 1: Building the static model

    Day 1: Setting up ROS: Indigo OS: Ubuntu 14.04 OS: Gazebo 7.0.0 Initialize the workspace To create t ...

  4. php : 配置

    一. php: undefined function mysql_connect()  mac 上操作 一.有可能是因为版本不同而引起的 PHP5中使用mysql_connect()函数进行连接.但P ...

  5. 工具网站gallery

    jQuery各个版本齐全的api 在线编辑器codepen

  6. Appium 服务关键字

    Appium 服务关键字 关键字 描述 实例 automationName 你想使用的自动化测试引擎 Appium (默认) 或 Selendroid platformName 你要测试的手机操作系统 ...

  7. 《开源安全运维平台:OSSIM最佳实践》内容简介

    <开源安全运维平台:OSSIM最佳实践 > 李晨光 著 清华大学出版社出版 内 容 简 介在传统的异构网络环境中,运维人员往往利用各种复杂的监管工具来管理网络,由于缺乏一种集成安全运维平台 ...

  8. 本机不能访问虚拟机中flask的web服务器的解决办法

    在虚拟机的linux里写flask程序,在本机中用"ip:端口号"的方法不能访问,查资料试了各种方法都不行.最后发现问题出在flask程序本身: flask的app.run()方法 ...

  9. App开发三种模式

    APP开发三种模式 现在App开发的模式包含以下三种: Native App 原生开发AppWeb App 网页AppHybrid App 混合原生和Web技术开发的App 详细介绍: http:// ...

  10. AX2012单元格显示颜色 displayOption

    public void displayOption(HV_WMSLocationStatusHistory _record, FormRowDisplayOption _options){    #d ...