Click here to Skip to main content
15,924,193 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How can pull your content from the database to it will be displayed on the page. this is how I try to pull something out content so it can be displayed on the page.

I try like this


C#
DataLinqDB db = new DataLinqDB();

        // GET: Default
        public ActionResult Index()
        {
            forside forsideindhold = db.forsides.FirstOrDefault(i => i.Id == 1);

            return View(forsideindhold.tekst);
        }


View:

C#
@model MVCTest2015.Controllers.DefaultController;


error: It is also such that it makes a red in the text., I get no error message but I can just see it's red.

How do I text out of here?
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900