Visual Studio change my code

Discussion in 'ASP .Net' started by Ola Johansson, Oct 30, 2003.

  1. I have made a custom "Pagebase" class that i inherits from all my web
    form pages.

    In my InitializeComponent method on each page i have added a "AddHandler
    Me.Load, AddressOf Page_Load".

    The problem is that each time i view my page in the designer VS.net
    removes my "AddHandler Me.Load, AddressOf Page_Load". And add "Handles
    MyBase.Load" on the "Page_Load" method.

    This would be ok if im was the only developer in the project but if
    other people should work with my page this can be a problem.

    Anyone have any ideas how to fix this .. ?

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Ola Johansson, Oct 30, 2003
    #1
    1. Advertising

  2. Ola Johansson

    AW Guest

    Just read what Visual Studio.net places at the top of the
    InitializeComponent method:
    /// Required method for Designer support - do not modify
    /// the contents of this method with the code editor.

    I would suggest placing your code in response to the Init event instead.
     
    AW, Oct 30, 2003
    #2
    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. wh
    Replies:
    2
    Views:
    532
    Cowboy \(Gregory A. Beamer\)
    Jan 16, 2004
  2. Thirumalai
    Replies:
    0
    Views:
    677
    Thirumalai
    May 22, 2006
  3. rockdale
    Replies:
    1
    Views:
    621
    Juan T. Llibre
    Aug 23, 2006
  4. xman
    Replies:
    0
    Views:
    516
  5. xman
    Replies:
    1
    Views:
    616
    Victor Bazarov
    Aug 17, 2005
Loading...

Share This Page