public ActionResult AgentHome()
{
ViewBag.IsfromHome = true;
ViewBag.UserName = User.Identity.Name;
var username=GeneralLogic.GetUserName();
var imdcode = Entities.tblUserDetails.Where(a => a.userlevel == "L0" && a.UserAccountID == Entities.tblUserDetails.Where(s => s.LoginID == username).Select(s => s.UserAccountID).FirstOrDefault()).Select(a=>a.IMDCode).FirstOrDefault();
ViewBag.imdcode = imdcode;
return View(ViewBag);
}
这是我的看法。 在那如何打破两个字符串
请任何人可以帮助如何打破字符串
if (ViewBag.IsfromHome != null)
{
if (ViewBag.IsfromHome == true)
{
// url += "Thanks and Regards"
url += "USERNAME :";
url = url + ViewBag.Username + " " + " ";
url += "IMDCODE :";
url = url + ViewBag.imdcode;
}
}
答案 0 :(得分:0)
尝试使用
url += "USERNAME :";
url = url + ViewBag.Username + " " + "<br />";
url += "IMDCODE :";
url = url + ViewBag.imdcode;'
希望它能够奏效。
或者您可以使用
url += "USERNAME :"+ViewBag.Username + " " + "<br />"+"IMDCODE :"+ViewBag.imdcode