how to add a code-behind page to a view or partial view

前端 未结 4 1422
面向向阳花
面向向阳花 2020-12-05 05:19

I notice with the latest version of ASP.NET MVC that a View no longer defaults to having code-behind classes.

How do I go about adding a code-behind class now to a

4条回答
  •  眼角桃花
    2020-12-05 05:56

    I'm not sure why you are creating a code behind file, but if you really really do, then I would consider using the standard webforms approach instead.

    I would also look into the basics of MVC to understand why page behinds are not needed.

    Another explanation

    How to use ASP:Chart without a code-behind (Option B)

提交回复
热议问题