Event Procedures and Methods

Discussion in 'ASP .Net' started by Kuldeep, May 23, 2006.

  1. Kuldeep

    Kuldeep Guest

    Hi All,

    Could anybody give me some ideas on the advantages and disadvantages when it
    comes to having Event Procedures and Methods in .aspx page rather than
    having them in .aspx.cs/.aspx.vb

    Regards,
    Kuldeep
     
    Kuldeep, May 23, 2006
    #1
    1. Advertising

  2. Kuldeep

    Kerem OZMAN Guest

    Based on my personal experience it's better to use codebehind pages (i.e.
    aspx.vb and aspx.cs) since it helps you to seperate the code and static
    content. And prior to Visual Studio 2005 you do not have some IDE features
    like intellisense when you are writing inline code (i.e. ASP.NET code within
    an aspx file.) But in some special cases (like data binding some controls
    together or catching events from objects within a DataGrid column -VS.NET
    2003- etc. you might want to use inline code or tag-based attributes and
    events of controls. But as I said they are special cases and they're not
    like that you are writing alll the code inline.) Also theree's a new web
    site project model with Visual Studio 2005 so that your code changes are
    reflected to your website almost instantly. Prior to Visual Studio 2005
    default project model for web applications (for Visual Studio.NET) was
    precompiling all your codebehind pages inside of an assembly and that was
    causing some problems with deployment and updates sometimes. But Visual
    Studio 2005 has support for intellisense within aspx files and a new project
    model. So in short, I like my code tidy and my static content seperated but
    it's always up to you to decide. Oh and a side note, you can bring back the
    old web application model (precompiled) to Visual Studio 2005 with a small
    update from Microsoft if you wish.It has a slight advandatge of hiding your
    VB or C# code within an assembly but remember that there are great
    decompilers for C# out there.Link for web application project model:
    http://msdn.microsoft.com/asp.net/reference/infrastructure/wap/default.aspx
    "Kuldeep" <> wrote in message
    news:%...
    > Hi All,
    >
    > Could anybody give me some ideas on the advantages and disadvantages when
    > it comes to having Event Procedures and Methods in .aspx page rather than
    > having them in .aspx.cs/.aspx.vb
    >
    > Regards,
    > Kuldeep
    >
    >
     
    Kerem OZMAN, May 23, 2006
    #2
    1. Advertising

  3. Kuldeep

    Kuldeep Guest

    Thanks Kerem, that was a good insight.

    Regards,
    Kuldeep
     
    Kuldeep, May 23, 2006
    #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. R Millman
    Replies:
    3
    Views:
    435
    Yan-Hong Huang[MSFT]
    Aug 6, 2003
  2. Fred
    Replies:
    2
    Views:
    1,076
    Craig Deelsnyder
    Jul 12, 2004
  3. KB
    Replies:
    3
    Views:
    870
    bobicanprogram
    Jan 21, 2010
  4. Andrew Wan
    Replies:
    20
    Views:
    519
    Sam Hobbs
    Jul 20, 2007
  5. Kenneth McDonald
    Replies:
    5
    Views:
    326
    Kenneth McDonald
    Sep 26, 2008
Loading...

Share This Page