Programmer_to_be
asked on
Inline code event handlers
Hello Experts
I am using Visual Studio.NET 2005 for ASP.NET (C#) development. Whenever I double click a control that I drag onto my webform (from the toolbox) it generates the default event handler in the code behind. Is there any way to get the event handler to appear inline with the HTML source (in a <script> tag) rather than the code behind by default?
Thank you
I am using Visual Studio.NET 2005 for ASP.NET (C#) development. Whenever I double click a control that I drag onto my webform (from the toolbox) it generates the default event handler in the code behind. Is there any way to get the event handler to appear inline with the HTML source (in a <script> tag) rather than the code behind by default?
Thank you
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Yes that is correct. One other "disadvantage" is that the method does not show up in the drop-down listts in the properties window as a valid event handler. However, VS is smart enough to take you to the inline code when you double-click the control _after_ you have copied and pasted the code.
ASKER
Are you therefore saying that I'll have to copy the event handler across from the code behind to the html source in a script block?
Thanks for your help