主题:我能把C#的代碼寫在aspx文件裡嗎?
public class user
{
static private int count;
static public int Count
{
get
{
return count;
}
}
public user()
{
count++;
}
static user()
{
count=0;
}
}
void Page_Load()
{
Response.Write("user count="+user.Count);
}
請問我該怎麼寫,是不是把上述代碼放在<script language=c# runat=server>把上述代碼放這裡</script>
{
static private int count;
static public int Count
{
get
{
return count;
}
}
public user()
{
count++;
}
static user()
{
count=0;
}
}
void Page_Load()
{
Response.Write("user count="+user.Count);
}
請問我該怎麼寫,是不是把上述代碼放在<script language=c# runat=server>把上述代碼放這裡</script>