今天用coalesys webMenu for Asp.net控件,发现对中文支持太差了,都是乱码,晕死了!别人是这么解决的!
private void Page_Load(object sender, System.EventArgs e)
{
String path = Server.MapPath(".");
if(!path.EndsWith("Web"))
path = Server.MapPath("../");
String pathForWms = path+"\\UserControl\\WorkerMenu.wms";
WorkerMenu.LoadState(pathForWms);
InitMenu();
}
private void InitMenu()
{
WorkerMenu.ItemFont.Size="12px";
WorkerMenu.ItemFont.Family="MS Sans Serif";
WorkerMenu.Groups[0].Items[0].Caption = "查询院系信息";
WorkerMenu.Groups[0].Items[1].Caption = "添加院系信息";
WorkerMenu.Groups[0].Items[2].Caption = "修改院系信息";
WorkerMenu.Groups[0].Items[3].Caption = "删除院系信息";
WorkerMenu.Groups[1].Items[0].Caption = "查询教师信息";
WorkerMenu.Groups[1].Items[1].Caption = "添加教师信息";
WorkerMenu.Groups[1].Items[2].Caption = "修改教师信息";
WorkerMenu.Groups[1].Items[3].Caption = "删除教师信息";
WorkerMenu.Groups[2].Items[0].Caption = "查询学生信息";
WorkerMenu.Groups[2].Items[1].Caption = "添加学生信息";
WorkerMenu.Groups[2].Items[2].Caption = "修改学生信息";
WorkerMenu.Groups[2].Items[3].Caption = "删除学生信息";
WorkerMenu.Groups[3].Items[0].Caption = "查询科目信息";
WorkerMenu.Groups[3].Items[1].Caption = "添加科目信息";
WorkerMenu.Groups[3].Items[2].Caption = "修改科目信息";
WorkerMenu.Groups[3].Items[3].Caption = "删除科目信息";
WorkerMenu.Groups[3].Items[5].Caption = "添加专业必修科目信息";
WorkerMenu.Groups[3].Items[6].Caption = "查询专业必修科目信息";
WorkerMenu.Groups[3].Items[7].Caption = "删除专业必修科目信息";
WorkerMenu.Groups[4].Items[0].Caption = "必修课程信息";
WorkerMenu.Groups[4].Items[0].Group.Items[0].Caption ="查询必修课程";
WorkerMenu.Groups[4].Items[0].Group.Items[1].Caption ="添加必修课程";
WorkerMenu.Groups[4].Items[0].Group.Items[2].Caption ="修改必修课程";
WorkerMenu.Groups[4].Items[0].Group.Items[3].Caption ="删除必修课程";
WorkerMenu.Groups[4].Items[1].Caption = "选修课程信息";
WorkerMenu.Groups[4].Items[1].Group.Items[0].Caption ="查询选修课程";
WorkerMenu.Groups[4].Items[1].Group.Items[1].Caption ="添加选修课程";
WorkerMenu.Groups[4].Items[1].Group.Items[2].Caption ="修改选修课程";
WorkerMenu.Groups[4].Items[1].Group.Items[3].Caption
]]>