下面这一段代码在我的机器上很诡异,
btnSelectState 这个东东,一旦我使用CTRL-K,CTRL-D快捷键(Format Document)后,第二个btnSelectState 就会自动变成btnselectstate
而第一个不变。晕倒,在别人的机器上试了一下也是。
使用的是Microsoft Visual Studio 2005 Team Edition for Software Developers,郁闷至极。。
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
<% =btnSelectState %>
<input style='<% =btnSelectState %>' id="btnSelect" type="button" value="选 择" /><br />
</form>
</body>
</html>
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
public string btnSelectState
{
get
{
return "Hello!";
}
}
}