我试图在Visual Studio Professional 2013中发布我的Web应用程序,但收到以下错误

我在这里问了同样的问题,但没有有用的答案.谁能请帮忙
我在_Layout.cshtml中有这段代码
<p class="site-title">@Html.ActionLink("your logo here", "Index", "Home")</p>
Run Code Online (Sandbox Code Playgroud)
而不是"你的徽标在这里"我想添加徽标图像.
我试图使用Dapper和存储过程在MVC中进行CRUD操作,但由于我无法解决的转换错误,我无法将结果从模型返回到控制器.任何人都可以帮助我回复我的结果
这是我的控制器
public ActionResult AllMobileList()
{
MobileMain MM = new MobileMain();
return View(MM.AllMobileListing().ToList());
}
[HttpGet]
public ActionResult Edit(string MobileID)
{
MobileMain MM = new MobileMain();
return View(MM.GetMobileList(MobileID));
}
Run Code Online (Sandbox Code Playgroud)
模型
public IEnumerable<TBMobileDetails> AllMobileListing()
{
var para = new DynamicParameters();
para.Add("@Type", 1);
var result= con.Execute("Sp_MVCDapper", para, commandType: CommandType.StoredProcedure).ToString();
return result; // Error happens here
}
public TBMobileDetails GetMobileList(string MobileId)
{
var para = new DynamicParameters();
para.Add("@Type", 2);
para.Add("@MobileId",Convert.ToInt32(MobileId));
var result = con.Execute("Sp_MVCDapper", para, commandType: CommandType.StoredProcedure).ToString();
return result; // Error happens here
} …Run Code Online (Sandbox Code Playgroud) 我的 JavaScript 如下
function DomainValidation() {
var val = document.getElementById('<%=txtDomainName.ClientID %>').value;
if (/^[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9](?:\.[a-zA-Z]{2,})+$/.test(val)) {
return true;
}
else {
alert("Enter Valid Domain Name");
return false;
}
}
Run Code Online (Sandbox Code Playgroud)
用于检查有效域名。它工作正常,除了当我尝试输入仅包含两个字符的域名时,它不接受。由于我不知道使用正则表达式,所以想知道我应该在哪里进行更改,以便它也接受只有两个字符的域名。
注意:- 在将其标记为重复并向我展示之前,我想告知上述脚本运行良好,但我希望它也接受仅包含两个字符的域名。
这是我的JavaScript:
<script type="text/javascript">
(function () {
var lidd = 1;
var ga1 = document.createElement('script'); ga1.type = 'text/javascript';
ga1.async = true;
var res = ["A1LpRTPOUKU%3d", "a8g%2bUPW0%2bck%3d", "ptb0PT3OMIc%3d", "8NzewxsG6Zc%3d"];
for (var i = 0; i < res.length; i++) {
alert('mid=' + res[i]);
ga1.src = ('https:' == document.location.protocol ? 'https://ssl' :
'http://') + 'localhost:59115/ui/trackconversion.aspx?cid=CAR9nmKJG1A%3d&mid=' + res[i] + '&lid=' + lidd;
var s1 = document.getElementsByTagName('script')[0];
s1.parentNode.insertBefore(ga1, s1);
}
})();
</script>
Run Code Online (Sandbox Code Playgroud)
我的问题是for循环在此代码中无法正常工作.这里的长度res是4,因此循环应该执行4次,但在我的代码中它只是部分执行.这意味着,当我执行的代码,我得到的 alert('mid=' + res[i]);4倍,显示所有的四个值,即"A1LpRTPOUKU%3d","a8g%2bUPW0%2bck%3d","ptb0PT3OMIc%3d" …