vs2005 page events for c#
-
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
-
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
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
-
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
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 theInitializeComponent
method. And you need to manage to add the call to theInitializeComponent
method since the VS 2005 does not do that for you, you can add to the overridenOnInit
orOnPreInit
.... method:override protected void OnInit(EventArgs e)
{
InitializeComponent();base.OnInit(e);
}