C#.NET输入一个日期,要求输出农历求解

cathy_cyy 2012-09-25 07:15:41
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"] + "不是闰年");
}



}
}
把农历的写进去要怎写啊?
...全文
92 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
devmiao 2012-09-25
  • 打赏
  • 举报
回复
建议你先学习下基本语法,函数调用的概念。
devmiao 2012-09-25
  • 打赏
  • 举报
回复
库函数是通用的,不分什么网页、非网页的。
好比你使用的Convert.ToInt32,控制台程序也能用。
cathy_cyy 2012-09-25
  • 打赏
  • 举报
回复
这个我看过了。。不是网页的。。
devmiao 2012-09-25
  • 打赏
  • 举报
回复
http://blog.csdn.net/zhoufoxcn/article/details/1896258

109,888

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧