Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. vs2005 page events for c#

vs2005 page events for c#

Scheduled Pinned Locked Moved ASP.NET
csharpquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    the pink jedi
    wrote on last edited by
    #1

    in vs2005, how do you create page events for c#? i used to use the dropdown list of page events from the GUI of vs2003

    T M 2 Replies Last reply
    0
    • T the pink jedi

      in vs2005, how do you create page events for c#? i used to use the dropdown list of page events from the GUI of vs2003

      T Offline
      T Offline
      ToddHileHoffer
      wrote on last edited by
      #2

      There is a list in the help section. ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.NETDEVFX.v20.en/cpref13/html/T_System_Web_UI_Page_Members.htm I haven't figured out how to add them without typing them out either. It was easier in VS 2003. Maybe we are missing something. how vital enterprise application are for proactive organizations leveraging collective synergy to think outside the box and formulate their key objectives into a win-win game plan with a quality-driven approach that focuses on empowering key players to drive-up their core competencies and increase expectations with an all-around initiative to drive up the bottom-line. But of course, that's all a "high level" overview of things --thedailywtf 3/21/06

      1 Reply Last reply
      0
      • T the pink jedi

        in vs2005, how do you create page events for c#? i used to use the dropdown list of page events from the GUI of vs2003

        M Offline
        M Offline
        minhpc_bk
        wrote on last edited by
        #3

        Hi there, Because the changes in ASP.NET 2.0 and the web pages now support auto event wire-up, so you can add the handler for an event of the Page instance by declaring the method in the naming format Page_event[^], for example Page_Load, Page_LoadComplete ...In Vs 2005, you can still add the event handlers using the Properties Window, however i don't think this is the official way to do this, but it's worth a try: + Open the web page .aspx in the design view, right click and choose View Component Designer. You can also choose this from the menu View|Component Designer. + Select the Properties Window in the left pane, select the code-behind class in the dropdownlist, then choose the event icon. + You now can add the event handler for a specific event of the class, VS 2005 will automatically add the code to wire up the event handler in the InitializeComponent method. And you need to manage to add the call to the InitializeComponent method since the VS 2005 does not do that for you, you can add to the overriden OnInit or OnPreInit .... method:

        override protected void OnInit(EventArgs e)
        {
        InitializeComponent();

        base.OnInit(e);
        

        }

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups