using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{ }
protected void btnok_Click(object sender, EventArgs e)
{
Session["year"] = year.Text;
int y = Convert.ToInt32(Session["year"]);
if (y % 4 == 0 && y % 100 != 0 || y % 400 == 0)
{
Response.Write(Session["year"] + "是闰年");
}
else
{
Response.Write(Session["year"] + "不是闰年");
}
}
}
把农历的写进去要怎写啊?
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{ }
protected void btnok_Click(object sender, EventArgs e)
{
Session["year"] = year.Text;
int y = Convert.ToInt32(Session["year"]);
if (y % 4 == 0 && y % 100 != 0 || y % 400 == 0)
{
Response.Write(Session["year"] + "是闰年");
}
else
{
Response.Write(Session["year"] + "不是闰年");
}
}
}
把农历的写进去要怎写啊?
好比你使用的Convert.ToInt32,控制台程序也能用。