M
Mikeon
Hello!
Today it came to me that ASP.NET has a special "feature" that takes an
event name defined on a control and adds the "On" prefix for it when it
is used in the ASPX file ie.: when you use the Button control, to wire
up the Click event you have to use the OnClick event.
Now that is a shame! Why ASP.NET changes the names of my events and
only in ASPX file (in the code behind the same event is named
correctly)?
I can see only problems that result from this one of the most obvious
is that it is not possible to define a client side "onclick" event for
the button, because ASP.NET already uses this name for my Click (!!!)
event.
Is there at least one GOOD reason why ASP.NET does what it does in a
way it is doing it?
Today it came to me that ASP.NET has a special "feature" that takes an
event name defined on a control and adds the "On" prefix for it when it
is used in the ASPX file ie.: when you use the Button control, to wire
up the Click event you have to use the OnClick event.
Now that is a shame! Why ASP.NET changes the names of my events and
only in ASPX file (in the code behind the same event is named
correctly)?
I can see only problems that result from this one of the most obvious
is that it is not possible to define a client side "onclick" event for
the button, because ASP.NET already uses this name for my Click (!!!)
event.
Is there at least one GOOD reason why ASP.NET does what it does in a
way it is doing it?