需要帮助在ASP.NET MVC中为多语言结构创建窗体

本文关键字:语言 结构 窗体 创建 MVC 帮助 ASP NET | 更新日期: 2023-09-27 18:00:37

我的数据库中有两个表。第一个是类别ID,第二个是类别名称。之所以将其价值观和id分开,是因为该网站将是多语言的。例如:

tableCategory - id | stringID | dateOfCreation
tableString - id | stringID | value | languageID 
// these two tables are connected with their stringIDs, 
// so the categories in the tableCategory can have different names 
// according to the user's language

好的,现在,我正在使用LINQ TO SQL,我想为管理员创建一个表单来插入新的类别名称。例如:

English | Italiano | Français 
entertainment | divertimento | divertissement
// where language names are column names and the values are within a textbox

那么,如何使用Html.TextBoxHtml.TextBoxFor助手来完成此任务呢?请给我一个很好的例子,同时描述控制器和模型中的过程。我感谢您对MVC新手的帮助:)

需要帮助在ASP.NET MVC中为多语言结构创建窗体

阅读aligray向您发布的博客链接,它帮助我解决了类似的问题:-)