to exee: idate_count = CInt(Txt_count.Text) 这一句就是VB的转换方法啦!to cenxaoi: 我转换的是Txt_count.text并不是txt_date.text,txt_count.text是我用来做输入数字用的。
Private Sub Imgbut_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles Imgbut.Click Dim strdate As Date Dim idate_count As Integer strdate = Txt_date.Text idate_count = val(Txt_count.Text) Txt_count.Text = strdate.AddDays(idate_count) End Sub
^_^ 哈哈哈我终于找出原因啦,是:Private Sub Page_Load() if not ispostback then '-------没有这样一句 . . . end if end sub不过还是谢谢各位的帮忙!散分...
CInt(Txt_count.Text)
日期型式的字串的怎能转换为整形的呢
Dim strdate As Date
Dim idate_count As Integer
strdate = Txt_date.Text
idate_count = val(Txt_count.Text)
Txt_count.Text = strdate.AddDays(idate_count)
End Sub
if not ispostback then '-------没有这样一句
.
.
.
end if
end sub不过还是谢谢各位的帮忙!散分...