0

I'm having a problem parsing my parameters in ASP.Net

Here's what i'm doing

    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

Anyone got any ideas?

Thanks

Jamie

2 Answers 2

1

If I understand it correctly you are calling EditDetails() without any parameters whereas your method expects two parameters. Does this even compile? if so, you should be calling method like EditDetails(sender,e)

Sign up to request clarification or add additional context in comments.

1 Comment

That worked - I'm a real newbie to this sorry - I was adding the whole ByVal Sender etc didn't realise you only needed to put sender,e many thanks
0

EditDetails - doesn't it require two arguments passing in? Sender and e?

EDIT:

Can't remember in vb - but try EditDetails(sender, e)

1 Comment

If I add that in like this EditDetails(ByVal Sender as Object, ByVal e as RepeaterCommandEventArgs) Then I get an error expression expected??

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.