Looking for old forum posts and information? View the old forum archive here ยป
Welcome to Vortx Community Forum, where you can ask questions and receive answers from the staff at Vortx and other members of the community.

If you had a user account on our previous forums website, you will need to register a new account here.

A static copy of our previous forums website is available online for reference. Click here to access the forum archive.

Learn more about...


Where to put code behind in c# in version 10?



I don't have fundemental training in c# and MVC .  Version 10 is all MVC and i haven't purchased the source code for aspdotnetstorefront.  I have v10 and no source code multistore.

I am trying to add a functionality where when user enter email address and submits, it take the email address and puts them in our mailing list.   For example, i have _Layout.cshtml file in my custom skin folder that i am modifying.


Where would i put the c# code for this to capture the email address from the input box and put it in a table in the database?  I do understand MVC and C# but don't have years of MVC training ... i'm so use to the old way of .cs file.


asked May 2, 2017 in MultiStore by vultureds (495 points)

1 Answer

0 votes
Best answer
To do that through C#, you're going to have to have a (M)odel to take the customer data from the (V)iew and hand it off to the (C)ontroller to be saved in the database.  With the source code that's a very simple modification, but without it things get pretty complicated, and it'd take a good understanding of MVC.

If you're not going to be able to buy the source code, I'd suggest looking into the various 3rd-party services that provide mailing list management features and can use simple Javascript forms to collect the addresses - MailChimp, iPost, etc.  With most of those you can just embed some JS in a topic or view and not have to worry about any custom C#.
answered May 3, 2017 by Vortx ScottS (13,500 points)
selected May 3, 2017 by vultureds
:(  ok no problem. Thank you.  I was hoping i can Model it in a .cs file since i know c#