Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Adding Event to C# VS 2003

Reply
Thread Tools

Adding Event to C# VS 2003

 
 
tshad
Guest
Posts: n/a
 
      11-02-2007
I normally use DW to create my pages and never have to worry about events.
They are just created.

In DW, all my code and design are on one page (no code-behind).

When I create a Page_PreRender event - it just works.

Sub Page_PreRender(ByVal Sender As Object, ByVal E As EventArgs)
....
End Sub

But in VS 2003 if I add the following lines

private void Page_PreRender(object sender, EventArgs e)
{
}

It doesn't generate the event.

I have to then go over to InitializeComponent Event and add the following
line:

this.Load += new System.EventHandler(this.Page_PreRender);

Why is this?

I don't have to add a special handler in DW.

Is there an easier way to add an event like this?

Thanks,

Tom


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding CALS on windows 2003 Small Business Server =?Utf-8?B?Sm9u?= MCSE 1 11-07-2005 02:09 PM
Adding Animation to Microsoft Word 2003 Andrews Family Computer Support 1 01-06-2005 12:42 AM
Windows 2003 IIS 6.0 SMTP splitting and adding extra characters =?Utf-8?B?QlBOQQ==?= ASP .Net 0 10-07-2004 10:45 PM
Adding a new dataset in Crystal report / CrystalDecisions.CrystalReports.Engine dll error with VS 2003 / Susil Patro ASP .Net 0 08-07-2004 01:45 PM
Adding a HTML Signature in Outllook 2003 AJM Computer Support 8 02-16-2004 01:23 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57