我在ASP.Net中解析我的参数时遇到问题
这就是我正在做的事情
Sub ItemCommand(ByVal Sender as Object, ByVal e as RepeaterCommandEventArgs)
If e.CommandName = "EditDetails" Then
EditDetails() <---- This is where it's dying
Else If e.CommandName = "SubmitDetails" Then
SubmitDetails()
End If
End Sub
Sub EditDetails(ByVal Sender as Object, ByVal e as RepeaterCommandEventArgs)
Dim strPassedItems = e.CommandArgument
Dim strNumberSlept As String = e.CommandArgument.Split("-"C)(0)
Dim strPassedBookingRef As String = e.CommandArgument.Split("-"C)(1)
CType(e.Item.FindControl("ddlEditAdults"), dropdownlist).Visible = True
CType(e.Item.FindControl("ddlEditChildren"), dropdownlist).Visible = True
End Sub
有人有任何想法吗?
由于
杰米
答案 0 :(得分:1)
如果我理解正确,你在没有任何参数的情况下调用EditDetails(),而你的方法需要两个参数。这甚至可以编译吗?如果是这样,你应该调用EditDetails(sender,e)
之类的方法答案 1 :(得分:0)
EditDetails - 它是否需要传入两个参数?发件人和e?
修改强>
在vb中无法记住 - 但请尝试EditDetails(发件人,e)