0

Hello

I am using the following in one Web page form in ASP.NET (VS 2013) in order to 'set focus' on the username field:

 Protected Sub Page_Load(ByVal sender As Object, _
    ByVal e As System.EventArgs)
        username.Focus()
    End Sub

It works on that form, but not on this new one: BC30269: 'Protected Sub Page_Load(sender As Object, e As System.EventArgs)' has multiple definitions with identical signatures:

Protected Sub Page_Load(ByVal sender As Object, _

I am not clear as to why it would work in one form and not another. The only difference is that this new form takes UserName and not username, but I have accounted for that. The error, in particular, is pointing to 'Page_Load'. What OTHER properties, or attributes, then would lead to this error - and how best to get it working?

Thank you.

2
Contributors
5
Replies
20
Views
2 Years
Discussion Span
Last Post by Blueie
0

I am able to replicate this error if I enter:

 Protected Sub Page_Load(ByVal sender As Object, _
    ByVal e As System.EventArgs)

End Sub

 Protected Sub Page_Load(ByVal sender As Object, _
    ByVal e As System.EventArgs)

End Sub

In the above code this error occured because it is defined more than once without changing the number of parameters.

Edited by cgeier

0

Hello cgeier

Thank you for your reply.

Do you mean because I have duplicated 'Sub Page_Load'? (please see attached).

In which way is it best to change the number of parameters?

Thank you for your patience.

Blueie

Attachments Sub_page_Load.jpg 36.49 KB Sub_page_Load.jpg 36.49 KB
0

Thank you, cgeier.

I'll watch out for that in the future.

Regards

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.