Phil Townsend wrote:
Let me rephrase what I am asking. Where are the definitions for the web
controls that are on the web form? Where are the event handlers defined?
They are NOT in the partial class that is visibly coupled with the
webform.
I assume you're asking if there is an equivalent in web forms of the
Windows Forms Form.Designer.cs file where all the variables are
instantiated and the events are wired up. I don't think there is.
The handlers will be in the aspx.cs file. To test this what I did was
to drag a button onto the web form. I then double clicked it.
In the .aspx page, it added an OnClick attribute to the asp:button
element.
In the .aspx.cs file it added this method:
protected void Button1_Click(object sender, EventArgs e)
{
}
I don't see any other code. I'm not sure if the code to wire up the
event handler is generated anywhere else (i.e. Button1.OnClick +=
Button1_Click;). I don't think it is, but I may be mistaken. I'm
guessing that it is wired up by ASP.Net when the page is requested.
If there is another file somewhere, I am not aware of it. (Of course
that doesn't mean its not there!!).
Cheers,
Chris