Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim i As Integer
If Not IsPostBack Then
For i = 1901 To 2050
ddlyear.Items.Add(CStr(i))
Next
For i = 1 To 2
ddlmonth.Items.Add(CStr(i))
Next
ddlyear.SelectedValue = Now.Year
ddlmonth.SelectedValue = Now.Month
For i = 1 To Day(Now.Year, Now.Month)
ddlday.Items.Add(CStr(i))
Next
ddlday.SelectedValue = Now.Day
End If
End Sub
Protected Sub ddlyear_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ddlyear.SelectedIndexChanged
Dim i, y, m As Integer
y = ddlyear.SelectedValue
m = ddlmonth.SelectedValue
ddlday.Items.Clear()
For i = 1 To Day(y, m)
ddlday.Items.Add(CStr(i))
Next
End Sub
_-----------------------------------------------
蓝色括号里出现错误,如何改正?错误提示是:public funtion day(datevalue as date ) as integer 的参数太多