0

I need to insert Cyrillic text into a SQL Server database. I'm using MVC 4, and the controller code is:

    public ActionResult AddCategory(Ferro_Balkan.Models.category Cat)
    {
        Ferro_Balkan.Models.ferroEntities ent = new Ferro_Balkan.Models.ferroEntities();

        if (ModelState.IsValid)
        {
            ent.Categoriis.Add(Cat);
            ent.SaveChanges();
            return RedirectToAction("AdminCategory", "Admin");
        }

        return View(Cat);
    }

I don't know how to insert Cyrillic text... I need a solution that works within the code listed.

John Saunders
  • 160,644
  • 26
  • 247
  • 397
  • Well, the code listed is ok - unless someone was not smart enough to use a N type of storage column. So the error mus be somewhere else. As you fail to give a baseline usabele error description - vote to close. Recommendation is to read a book about programming. And come back when you are able to tell us what the error you experience is. – TomTom Feb 28 '14 at 05:54

1 Answers1

0

You need to verify that charset of the page submitting Cyrillic value(Cat) to you is set to UTF-8. If it is then you should not have any problem.

All Blond
  • 802
  • 1
  • 8
  • 16