Why does Visual Studio sometimes add a number when creating page events in codebehinds?
- by Kevin Pang
When writing up a codebehind in Visual Studio for ASP.NET web forms applications, I often use the dropdowns at the top of the window to autogenerate page event handlers (e.g. Page_Load, Page_PreRender). I've noticed that sometimes Visual Studio likes to add numbers to these function names like "Page_Load1" or "Page_PreRender2".
Programatically speaking, this has no effect on the code. But stylistically, I find it a bit ugly. Is there any way to get rid of this behavior?