Do ASP.NET user controls always have an ascx file extension?
Okay, maybe it's a bit pedantic, but do ASP.NET user controls HAVE to have an ascx
extension?
My reason for wanting to know this is purely academic. I made the statement to someone that they usually have an ascx extension开发者_开发问答, but then I had the curious thought of if that was always true or not.
No. It's default, but it's not a requirement. I would recommend that you stick to this standard, however, as it makes it easy for anybody coming onto your project to understand what files are user controls just by glancing at them.
精彩评论