0

I have been using ASP.net MVC for a new website.

I have found a minor nagging issue with having views with the same name but are in different folders i.e. Views/Home/Index.aspx and Views/Account/Index.aspx The codebehind files act as if they are partial classes when there is a definition for the same event or function (i.e. PageLoad event). I have avoided this issue by explicitly providing a Namespace to the codebehind file (using the Folder name) and updating the reference in the markup page.

But like i said, this is annoying. Is there something i'm not doing correctly? or is this just a bug in beta software?

1 Answer 1

2

No, this is not a bug in the beta software. It has nothing to do with MVC specifically or ASP.NET in general. Essentially, your problem boils down to you wanting to have two distinct classes with the same name. The only way to do this is to put them in different namespaces.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.