VB.Net Handles keyword for event handler goes away,dissapears

Discussion in 'ASP .Net Web Controls' started by thomas, Mar 7, 2005.

  1. thomas

    thomas Guest

    annoyingly, every so often after a compile, my code will cease to work because the Handles keyword gets removed from the end of the method.
    ex: Private Sub buttonMakeTransfer_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles buttonMakeTransfer.Click
    ....
    might become
    Private Sub buttonMakeTransfer_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
    ....
    this happens infrequently and i can't pinpoint the cause.
    thanks for your help!
    thomas

    ___
    Newsgroups brought to you courtesy of www.dotnetjohn.com
     
    thomas, Mar 7, 2005
    #1
    1. Advertising

  2. Re: VB.Net Handles keyword for event handler goes away, dissapears

    It happens to me sometimes when I cut and paste a control.
    I agree it's annoying.

    --
    I hope this helps,
    Steve C. Orr, MCSD, MVP
    http://SteveOrr.net


    "thomas" <> wrote in message
    news:%...
    > annoyingly, every so often after a compile, my code will cease to work
    > because the Handles keyword gets removed from the end of the method.
    > ex: Private Sub buttonMakeTransfer_Click(ByVal sender As System.Object,
    > ByVal e As System.EventArgs) Handles buttonMakeTransfer.Click
    > ...
    > might become
    > Private Sub buttonMakeTransfer_Click(ByVal sender As System.Object, ByVal
    > e As System.EventArgs)
    > ...
    > this happens infrequently and i can't pinpoint the cause.
    > thanks for your help!
    > thomas
    >
    > ___
    > Newsgroups brought to you courtesy of www.dotnetjohn.com
     
    Steve C. Orr [MVP, MCSD], Mar 7, 2005
    #2
    1. Advertising

  3. Re: VB.Net Handles keyword for event handler goes away, dissapears

    Something to try...

    When you add a control or markup in HTML view, make sure you save the page
    before switching to the code behind.


    "thomas" <> wrote in message
    news:%...
    > annoyingly, every so often after a compile, my code will cease to work
    > because the Handles keyword gets removed from the end of the method.
    > ex: Private Sub buttonMakeTransfer_Click(ByVal sender As System.Object,
    > ByVal e As System.EventArgs) Handles buttonMakeTransfer.Click
    > ...
    > might become
    > Private Sub buttonMakeTransfer_Click(ByVal sender As System.Object, ByVal
    > e As System.EventArgs)
    > ...
    > this happens infrequently and i can't pinpoint the cause.
    > thanks for your help!
    > thomas
    >
    > ___
    > Newsgroups brought to you courtesy of www.dotnetjohn.com
     
    Ken Cox [Microsoft MVP], Mar 7, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?VHJveQ==?=

    user control dissapears from panel on post back

    =?Utf-8?B?VHJveQ==?=, Jan 23, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    486
    Marina
    Jan 23, 2004
  2. Tina

    VS.NET Just Goes Away

    Tina, Jun 17, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    375
    Kevin Spencer
    Jun 20, 2005
  3. Replies:
    1
    Views:
    308
    Jukka K. Korpela
    Jul 4, 2006
  4. Replies:
    1
    Views:
    727
    Damien
    Feb 22, 2007
  5. eino
    Replies:
    1
    Views:
    446
    =?ISO-8859-15?Q?=22Martin_v=2E_L=F6wis=22?=
    May 8, 2007
Loading...

Share This Page