locked
how to use mvc pattern with web form : cannot reference view class inside controller class RRS feed

  • Question

  • Hi

    I am trying to learn design patterns using  a book " C# design patterns essentials";

    for mvc pattern the book uses windows form application; but i want to use web form. the problem came when I wanted to reference the webpage class  (SatNavView.aspx.cs) in SatNavControllers.cs class ( which resides inside appcode folder)

    so I moved the webpage class  (SatNavView.aspx.cs)  and I cannot access the controls on the page;

    So I copied the controller class into the same place as the view class (SatNavView.aspx.cs)  but to my surprise I cannot have a reference of the view class (SatNavView.aspx.cs)  in the controller class SatNavControllers.cs;

    Need help how to apply mvc pattern to web form 

    • Moved by Eason_H Tuesday, November 12, 2013 9:45 AM
    Monday, November 11, 2013 5:26 PM

Answers

  • I suggest you use the Music Store Application tutorial in the link below,

    http://www.asp.net/mvc

    I also suggest that you post questions about MVC and ASP.NET at the MVC forum link below and ask developers what MVC book you should be using.

    http://forums.asp.net/

    • Proposed as answer by Just Karl Wednesday, November 13, 2013 4:47 PM
    • Marked as answer by Just Karl Wednesday, November 20, 2013 6:36 PM
    Monday, November 11, 2013 8:23 PM
  • Please post ASP.NET questions in the ASP.NET forums (http://forums.asp.net).
    • Proposed as answer by Just Karl Wednesday, November 13, 2013 4:47 PM
    • Marked as answer by Just Karl Wednesday, November 20, 2013 6:36 PM
    Monday, November 11, 2013 9:15 PM

All replies

  • I suggest you use the Music Store Application tutorial in the link below,

    http://www.asp.net/mvc

    I also suggest that you post questions about MVC and ASP.NET at the MVC forum link below and ask developers what MVC book you should be using.

    http://forums.asp.net/

    • Proposed as answer by Just Karl Wednesday, November 13, 2013 4:47 PM
    • Marked as answer by Just Karl Wednesday, November 20, 2013 6:36 PM
    Monday, November 11, 2013 8:23 PM
  • Please post ASP.NET questions in the ASP.NET forums (http://forums.asp.net).
    • Proposed as answer by Just Karl Wednesday, November 13, 2013 4:47 PM
    • Marked as answer by Just Karl Wednesday, November 20, 2013 6:36 PM
    Monday, November 11, 2013 9:15 PM