本文介绍了关于Asp4.0的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何从两个文本框中取消时间并存储到asp中的另一个文本框中.
how to substrat time from two textboxes and store into another textbox in asp
推荐答案您可以使用TimeSpan. 这是该示例 You can use TimeSpan. Here are example for that DateTime dt1= DateTime.Now; // select Date 1 DateTime dt2= DateTime.Now.AddDays(20); // select Date 2 TimeSpan ts = dt2 - dt1; // Substract Date 2 to Date 1 Textbox1.Text= ts.Days; // Get The Total Days Difference
在这里,它给出了20天不同的时间
Here it gives 20 for days different
更多推荐
关于Asp.net4.0的问题
发布评论