所以我对aspx文件有一个条件:
<% if (yes)
{%>
{
<div>
<h1>hell yes!!</h1>
<p>Welcome</p>
</div>
<%}%>/
这是我在页面加载时的代码
protected void Page_Load(object sender, EventArgs e)
{
if (accnt != null)
{
using (SqlConnection conn = new SqlConnection(connectionstring))
{
conn.Open();
string strSql = "select statement"
:
:
try
{
if (intExists > 0)
{
bool yes= check(accnt);
}
}
catch
{
}
}
}
我得到错误:
CS0103: The name 'yes' does not exist in the current context
我想知道我做错了什么......