[英]converting URL to Action Link @url.action
I have problem with IIS does not read the URL. Failed to load resource: the server responded with a status of 503 (Service Unavailable)我有问题 IIS 没有读取 URL。无法加载资源:服务器响应状态为 503(服务不可用)
My project is on Asp.net MVC I have used a Jqx grid on my project but the grid does not load data on IIS.我的项目在 Asp.net MVC 我在我的项目中使用了 Jqx 网格,但网格不加载 IIS 上的数据。
How can I convert the URL to Action Link @url.action, so the IIS can read?如何将 URL 转换为 Action Link @url.action,以便 IIS 可以读取?
My URL on my grid.我的 URL 在我的网格上。
url: "/Home/GetIMScompinfo?CompanyName=" + $("#CompanyName").val() + "&StoreName=" + $("#StoreName").val() + "&ComputerName=" + $("#ComputerName").val() + params url: "/Home/GetIMScompinfo?CompanyName=" + $("#CompanyName").val() + "&StoreName=" + $("#StoreName").val() + "&ComputerName=" + $("# ComputerName").val() + 参数
url: "/Home/GetSubItems?scopeId=" + id url: "/Home/GetSubItems?scopeId=" + id
url: "/Home/GetIMScompinfo?CompanyName=" + $("#CompanyName").val() + "&StoreName=" + $("#StoreName").val() + "&ComputerName=" + $("#ComputerName").val() + params url: "/Home/GetSubItems?scopeId=" + id url: "/Home/GetIMScompinfo?CompanyName=" + $("#CompanyName").val() + "&StoreName=" + $("#StoreName").val() + "&ComputerName=" + $("# ComputerName").val() + params url: "/Home/GetSubItems?scopeId=" + id
I don't know what is the difference between the two getting the value.我不知道两者获得价值有什么区别。 So I give the sample script for the first url.所以我给出了第一个 url 的示例脚本。
<button class="btn-class" id="press" type="button" onclick="changeHref1()">Genrate first url</button>
<script type="text/javascript">
function changeHref1() {
var url = '@Url.Action("About","Home")';
var company = $('#CompanyName').val();
var store = $('#StoreName').val();
var computer = $('#ComputerName').val();
window.location.href = url + '?CompanyName=' + company + '&StoreName=' + store + '&ComputerName=' + computer;
}
</script>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.