DateTime t1 = datenow;
DateTime t2 = Convert.ToDateTime(ipcon.AddTime);
int timesp = Convert.ToInt32(((TimeSpan)(t1 - t2)).TotalMinutes);
if (timesp < 15)
{
Page.RegisterStartupScript("ServiceManHistoryButtonClick", "<script>window.alert('你已经投过票了,谢谢参与!')</script>");
}
转载于:https://www.cnblogs.com/windphoenix/archive/2009/06/16/1504556.html