Auto-generated code getting lost

Discussion in 'ASP .Net' started by Heiko Milke, Jan 14, 2004.

  1. Heiko Milke

    Heiko Milke Guest

    When working with Visual Studio 2003 it sometimes happens
    that auto-generated code gets lost.

    I have an .aspx page with its parental c# codebehind page.
    When creating a webform using the studio there is a section
    for auto-generated code. Within this region there is a
    function "InitializeComponent" that also registers all
    event handlers for the form. Sometimes for no obvious
    reason the body of this function gets emptied.

    Any idea how i could prevent this from happening or how i
    could force the Studio to revalidate this function's source
    code?


    Thanks in advance
    Heiko Milke!
     
    Heiko Milke, Jan 14, 2004
    #1
    1. Advertisements

  2. I've had that problem in a non-web project.
    It occurred sometimes when I was manually modifying the code in that
    section.

    As the auto-generated comments say,
    it is better not to manually modify it.

    Hope this helps,
    F.O.R.
     
    Frank 'Olorin' Rizzi, Jan 14, 2004
    #2
    1. Advertisements

  3. Heiko Milke

    Guest Guest

    I didn't touch the region :)

    Any other ideas?

    Thanks in advance
    Heiko!
     
    Guest, Jan 15, 2004
    #3
  4. I had that.
    There is a KB article on Microsoft about it.


    George.
     
    George Ter-Saakov, Jan 19, 2004
    #4
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.