Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Biagio Paruolo 1597 posts 1828 karma points c-trib
    Sep 02, 2013 @ 17:13
    Biagio Paruolo
    0

    MVC model and view in U6.1.x

    Hi, I need to create a form in a U6.1.x 

    I read this http://our.umbraco.org/documentation/Reference/Mvc/forms , but I don't understand if is I need VS. Is it possibile to build with Umbraco backoffice editor? Can I use Razor form ( not MVC )? I need to save data into a database and send email.

  • Bo Damgaard Mortensen 719 posts 1207 karma points
    Sep 02, 2013 @ 21:59
    Bo Damgaard Mortensen
    0

    Hi Biagio,

    I think for MVC you'll need Visual Studio, yes. With VS running your should be able to create the SurfaceControllers you need for the form(s)

    However, if you run Umbraco with webforms, you should be able to create the form within a Razor file, directly in Umbraco by going to the developer section, create a new Razor file under "Scripting files" and you're good to go :-)

    Does this answer your question?

    All the best,

    Bo

  • Biagio Paruolo 1597 posts 1828 karma points c-trib
    Sep 02, 2013 @ 22:20
    Biagio Paruolo
    0

    Hi, 

    The site is near RTM fase and the last step is only this form -.). I build the site in a few days ( I know Umbraco well ), but I don't understand how setting up a VS project for U6.x MVC ( where is a guide ? ) . The site is alread on the server and then I would to download the site + database on my devel server ( and waste some time ). So for the next project, I'll start from Vs. Is right? Sometime the are problem to upload the site on production server like links lost, images and so.

    Is there a speed up method without to use Vs for building a small form? 

    With Umbraco Webform, I used razor form with inline code...

     

     

     

     

  • Bo Damgaard Mortensen 719 posts 1207 karma points
    Sep 02, 2013 @ 22:35
    Bo Damgaard Mortensen
    0

    Hi Biagio,

    There's a great video on umbraco.tv: http://umbraco.tv/videos/developer/fundamentals/surface-controllers/introduction/ This explains how to set up the project in Visual Studio using NuGet etc. :-)

    This video section goes through setting up a form in MVC aswell.

    For the form, I think you should be able to create a simple form without using a SurfaceController by simply creating a partial view in Umbraco. I haven't used Umbraco as MVC much myself, so this is quite a shot in the dark. However, to my understanding, the partial view is much like a regular Razor file in Umbraco running webforms. Correct me if I'm wrong here ;-)

    / Bo

  • Biagio Paruolo 1597 posts 1828 karma points c-trib
    Sep 02, 2013 @ 23:22
    Biagio Paruolo
    0

    Hi Mortensen,

    thank you for your reply. Yes, into partial view you can use Razor code like macros. I try to build a simple form with legacy post and see what happen... -:)

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Sep 03, 2013 @ 12:11
  • Biagio Paruolo 1597 posts 1828 karma points c-trib
    Sep 03, 2013 @ 12:35
    Biagio Paruolo
    0

    Hi,

    Do I need Visual Studio or I can made this files in notes and put in in appdata ( dynamic compiling )?

     

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Sep 03, 2013 @ 12:38
    Jeroen Breuer
    0

    You should be able to add them to the app_code folder. Perhaps that CWS Start is also doing that, but I haven't tried it yet.

    Jeroen

Please Sign in or register to post replies

Write your reply to:

Draft