Beta 2 inherits

Discussion in 'ASP .Net' started by sck10, May 4, 2005.

  1. sck10

    sck10 Guest

    Hello,

    I was using the following for my codebehind with VW Developer Beta1:
    Imports System
    Imports System.Web
    Imports System.Web.UI
    Imports System.Web.UI.WebControls
    Imports System.Web.UI.WebControls.ImageButton
    Imports System.Data
    Imports System.Data.OLEDB
    Imports System.Web.Mail
    Partial Class default_aspx


    When I created a new page, I got the following.
    Partial Class default_aspx
    Inherits System.Web.UI.Page

    My question is how do I convert what I had in Beta 1 to the new format (Beta
    2)?

    --
    Thanks in advance,

    sck10
     
    sck10, May 4, 2005
    #1
    1. Advertising

  2. sck10

    Bruce Barker Guest

    the coding model has been changed. in asp.net 1.0, the aspx page inherited
    from the code behind. this caused the following

    1) the code behind had to declare the server controls
    2) the code behind had to hookup the events
    3) to share variables from the codebehind to the aspx page, they had to be
    protected

    the new model, is thru the partial code model, the code behind and the aspx
    page are merged into one il file (but you may think of it as a source
    merge).

    so to convert code from 1.0 to 2.0

    1) change the class def to be a partial
    2) remove all those protected declares
    3) remove all form designer 1.0 code
    4) open the page in the new designer
    5) fix any compatibility changes

    -- bruce (sqlwork.com)








    "sck10" <> wrote in message
    news:eSPX%...
    > Hello,
    >
    > I was using the following for my codebehind with VW Developer Beta1:
    > Imports System
    > Imports System.Web
    > Imports System.Web.UI
    > Imports System.Web.UI.WebControls
    > Imports System.Web.UI.WebControls.ImageButton
    > Imports System.Data
    > Imports System.Data.OLEDB
    > Imports System.Web.Mail
    > Partial Class default_aspx
    >
    >
    > When I created a new page, I got the following.
    > Partial Class default_aspx
    > Inherits System.Web.UI.Page
    >
    > My question is how do I convert what I had in Beta 1 to the new format
    > (Beta
    > 2)?
    >
    > --
    > Thanks in advance,
    >
    > sck10
    >
    >
     
    Bruce Barker, May 4, 2005
    #2
    1. Advertising

  3. Thanks for Bruce's informative suggestions.

    Hi Sck10,

    For detailed description on the changes from beta1 to beta2, we can also
    refer to the tech articles in the ASP.NET
    dev center in msdn site:

    #Changes for Beta 2
    http://msdn.microsoft.com/asp.net/beta2/beta2update.aspx

    Hope also helps.

    Regards,

    Steven Cheng
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)
     
    Steven Cheng[MSFT], May 5, 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. Mark Oliver

    install Beta 2 after Beta 1?

    Mark Oliver, Jan 25, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    396
    Scott Allen
    Jan 25, 2005
  2. Alex Nitulescu
    Replies:
    0
    Views:
    352
    Alex Nitulescu
    Feb 22, 2005
  3. Replies:
    1
    Views:
    2,170
    Bruce Barker
    May 3, 2005
  4. Eugene Toporov
    Replies:
    0
    Views:
    751
    Eugene Toporov
    Jul 15, 2004
  5. ton
    Replies:
    1
    Views:
    1,028
    Teemu Keiski
    Jun 24, 2007
Loading...

Share This Page