Why does Visual Studio sometimes add a number when creating page events in codebehinds?

Posted by Kevin Pang on Stack Overflow See other posts from Stack Overflow or by Kevin Pang
Published on 2010-05-13T01:20:28Z Indexed on 2010/05/13 1:24 UTC
Read the original article Hit count: 341

Filed under:
|

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?

© Stack Overflow or respective owner

Related posts about visual-studio

Related posts about ASP.NET