比较使用日期的两个文本框...在Asp.net中的日历Extendar [英] comparision of two textboxes using Dates ... Calendar Extendar in Asp.net

查看:47
本文介绍了比较使用日期的两个文本框...在Asp.net中的日历Extendar的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用日期比较两个文本框... Asp.net中的日历扩展器

======================== ================================================== ===



你好朋友,



正在使用C#SqlServer 2005 DB处理ASP.Net项目。



在我的网页上我有两个带有Calendar Extender的文本框。



1st Textbox - 已发布日期(TxtIssuedDate)

第2个文本框 - 到期日期(TxtExpiryDate)



现在我想比较两个文本框。如果我从发布日期选择日期,并且当我选择到期日期时,下一个

,到期日期必须大于发布日期和今天日期。



所以请帮帮我,怎么做。



谢谢@dvance。

comparision of two textboxes using Dates ... Calendar Extender in Asp.net
=============================================================================

Hello Friends,

am working on ASP.Net Project using C# SqlServer 2005 DB.

on my webpage I have two Textboxes with Calendar Extender with it.

1st Textbox - Issued Date (TxtIssuedDate)
2nd Textbox - Expiry Date (TxtExpiryDate)

Now i want to Compare the two textboxes. If i select Date from Issued Date , AND NEXT
when i Select Expiry date the expiry date must be greater than Issued Date and Todays Date.

so please help me, how to do this.

Thanks in @dvance.

推荐答案

在提交时验证发布日期是否更大,

validate at the time of submit wheather issue date is greater or not,
bool validate()
{
if (Datetime.Parse(TxtIssuedDate.text) > Datetime.Parse(TxtExpiryDate.text))
        {
            return false;
        }
else
{
return true;
}
}


您好,

您可以使用此javascript

Hi,
You can use this javascript
function CheckValid() {

          var fromDate =


' #<%= txtFromDt.ClientID%> ;')VAL();
var toDate =
('#<%=txtFromDt.ClientID %>').val(); var toDate =


这篇关于比较使用日期的两个文本框...在Asp.net中的日历Extendar的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆