ASP.NET显示农历时间改进版(3)

public partial class _Default : System.Web.UI.Page 

    protected void Page_Load(object sender, EventArgs e) 
    { 
 
    } 
 
    protected void Button1_Click(object sender, EventArgs e) 
    { 
        CountryDate cd = new CountryDate(); 
        string ChineseTimeNow = cd.GetChineseDate(DateTime.Now);//农历日期 
        string ForignTimeNow = DateTime.Now.GetDateTimeFormats('D')[0].ToString();//公历日期 
 
        lblCountryDate.Text = ChineseTimeNow; 
        lblForignDate.Text = ForignTimeNow; 
    } 
}

运行效果如下图所示:

ASP.NET显示农历时间改进版

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wjzgdj.html