我的完全可以,请黏贴如下代码看看呢?(我用maxthon最新版本的):
以下是aspx代码:
<%@
page
language="c#"
autoeventwireup="true"
codebehind="webform7.aspx.cs"
inherits="testwebdemo.webform7"
enableviewstate="false"
%>
<!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>viewstate
demo</title>
</head>
<body>
<form
id="form1"
runat="server"
method=get>
<div>
<input
type=textbox
value='
<%=configurationmanager.appsettings["constr"]%>'
style='width:734px'
/>
</div>
</form>
</body>
</html>
以下是配置文件:
<configuration>
<appsettings>
<add
key="constr"
value="server=server2;database=test;uid=*****;pwd=*****"/>
</appsettings>
<connectionstrings>
<add
name="northwindconnectionstring"
connectionstring="data
source=.\sqlexpress;initial
catalog=northwind;integrated
security=true"
providername="system.data.sqlclient"/>
</connectionstrings>
....