2013年9月23日18:04:06

直接cshtml页面的js中使用     var customerId = @(ViewBag.Oppotunity as OppotunityDto==null?0:(ViewBag.Oppotunity as OppotunityDto).CustomerId);

这里的var 是js中的

 

 

 2013年7月25日11:52:51       添加

将数组按照某个字符拼接起来

String.Join(",",数组)

 

 

 

@MvcHtmlString.Create(html)

IE 下 获得后,然后jquery拼接参数,传过去,如果还有中文,会乱码的问题

前台这样写 getUrl是

function getUrl() {
var ct = $("#casetime").val();
var ccontent = $("#caseContent").val();

var d = "CaseTime=" + ct;
d += "&CaseContent=" + ccontent;
return d;

}

 

postUrl = "../Heimingdan/DoCaseEdit?" + getUrl();
postUrl = encodeURI(postUrl);

 

到action中

         model.CaseContent = System.Web.HttpUtility.UrlDecode(model.CaseContent);

相关文章:

  • 2021-10-12
  • 2021-12-07
  • 2021-07-25
  • 2022-12-23
  • 2021-10-20
  • 2021-10-24
  • 2021-11-04
猜你喜欢
  • 2021-08-18
  • 2022-12-23
  • 2022-12-23
  • 2021-12-17
  • 2021-11-11
  • 2021-10-17
  • 2021-08-31
相关资源
相似解决方案