标签:trap 灵活 views rtti market 简洁 disable 概述 直接
一、@Html.ActionLink()概述
在MVC的Rasor视图引擎中,微软采用一种全新的方式来表示从前的超链接方式,它代替了从前的繁杂的超链接标签,让代码看起来更加简洁。通过浏览器依然会解析成传统的a标签。除此之外,还允许我们添加Html属性。下面来看看@Html.ActionLink()的使用方法吧。
二、@Html.ActionLink()的使用详解
1. @Html.ActionLink("linkText", "actionName")
这种重载的第一个参数是该链接要显示的文字,第二个参数是对应的控制器的方法(Action),默认控制器为当前页面对应的控制器。
例如,当前页面的控制器为ProductsController:@Html.ActionLink("detial", "Detial")会生成<a href="/Products/Detail">detail</a>
2. @Html.ActionLink("linkText", "actionName", "controllerName")
该重载比第一个重载多了一个参数,他指定了控制器的名称。
例如,@Html.ActionLink("detail", "Detail", "Products")会生成<a href="Products/Detail">detail</a>
3. @Html.ActionLink("linkText", "actionName", routeValues)
相对于上一种重载,该重载新增了routeValue参数,routeValue可以向action传递参数。
例如,@Html.ActionLink("detail", "Detail", new{ id = 1 })会生成<a href="Products/Detail/1">detail</a>
4. @Html.ActionLink("linkText", "actionName", routeValues, htmlAttributes)
htmlAttribute可以设置<a>标签的属性。
例如,@Html.ActionLink("detail", "Detail", new{ id = 1 }, new{ target = "_blank" })会生成<a href="Products/Detail/1" target="_blank">detail</a>,需要注意的是如果写成new{ target="_blank", class="className" }则会报错,因为Class是C#的关键字,此时应该写成@class="className"。
5. @Html.ActionLink("linkText", "actionName", "controllerName", routeValues, htmlAttributes)
该种重载汇聚了以上此种重载的所有参数,是功能最全的重载。
三、@Url.Action(),@Html.ActionLink(),Html.RenderAction()和@Html.Action()的区别
1. 返回值不同
2. 生成的东西不同
@{
ViewBag.Title = "Index";
}
<script type="text/javascript">
function test() {
var login = $("#Login").val();
var PassWorld = $("#PassWorld").val();
var url = "Login/login?login=" + login + "&PassWorld=" + PassWorld;
var url2 = "Login/login";
window.location.href = url2;
return false;
}
</script>
<form>
@Html.ActionLink("提交","login",new {login= "a",PassWorld="c"});
账号:<input type="text" value="" id="Login" />
密码:<input type="text" value="" id="PassWorld" />
<button type="submit" value="提交" style="width:15px; height:15px;" onclick="return test()"></button>
</form>
本来想通过@Html.ActionLink获取input标签里面的值 传到后台 但是网上搜了好多文章 发现目前还解决不了这个问题 都是改用了别的途径 比如我写的通过js跳转
感觉@Html.ActionLink 现在更适合跟Model一起使用 比如下面的代码 大数据后台项目的一个页面
@using System.Web.Mvc;
@using BigDataBackSite.Models;
@using BigDataBackSite.Tools;
@using Webdiyer.WebControls.Mvc;
@model PagedList<UsersandServiceCount>
@{
ViewBag.Title = "Index";
Layout = "~/Views/Shared/_Layout.cshtml";
<link href="@Url.Content("~/Content/css/bootstrap.min.css")" rel="stylesheet" />
<link href="@Url.Content("~/Content/css/font-awesome.css")" rel="stylesheet" />
<link href="@Url.Content("~/Content/css/style.min.css")" rel="stylesheet" />
<link href="@Url.Content("~/Content/houtai.css")" rel="stylesheet" />
<script src="@Url.Content("~/Scripts/jquery-1.10.2.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/bootstrap.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/MvcPager.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/DataScript/DataScript.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/JS/Users/Users.js")" type="text/javascript"></script>
}
<style type="text/css">
.on {
width: 80px;
height: auto;
position: relative;
}
.angle_top {
border-style: solid;
border-width: 0 6px 6px;
border-color: transparent transparent #5e5e5e;
position: absolute;
transform: rotate(180deg);
/*bottom: 10px;*/
top:2px;
/*right: 3px;*/
}
.angle_bottom {
border-style: solid;
border-width: 0 6px 6px;
border-color: transparent transparent #5e5e5e;
position: absolute;
top:9px;
/*right: 3px;*/
left:8px;
}
.index_tab2_1 tr td:last-child/*,.index_tab2_1 tr th:last-child*/{min-width:330px;}
</style>
<script type="text/javascript">
$(function () {
//到期时间,登录次数排序
var userName = $("#userName").val();
var name = $("#name").val();
var mobile = $("#mobile").val();
var logname = $("#logname").val();
var corpName = $("#corpName").val();
var userType = $("#userType").val();
var lockState = $("#lockState").val();
var checkState = $("#checkState").val();
var startTime = $("#startTime").val();
var endTime = $("#endTime").val();
var serviceCount = $("#serviceCount").val();
$("#ExpiredDateASC").click(function () {
$("#ExpiredDateASC").attr("href", "/Users/Index?orderstr=ExpiredDate ASC&userName=" + userName + "&name=" + name + "&mobile=" + mobile + "&logname=" + logname + "&corpName=" + corpName +
"&userType=" + userType + "&lockState=" + lockState + "&checkState=" + checkState + "&startTime=" + startTime + "&endTime=" + endTime + "&serviceCount=" + serviceCount);
});
$("#ExpiredDateDESC").click(function () {
$("#ExpiredDateDESC").attr("href", "/Users/Index?orderstr=ExpiredDate DESC&userName=" + userName + "&name=" + name + "&mobile=" + mobile + "&logname=" + logname + "&corpName=" + corpName +
"&userType=" + userType + "&lockState=" + lockState + "&checkState=" + checkState + "&startTime=" + startTime + "&endTime=" + endTime + "&serviceCount=" + serviceCount);
});
$("#LogAmountASC").click(function () {
$("#LogAmountASC").attr("href", "/Users/Index?orderstr=LogAmount ASC&userName=" + userName + "&name=" + name + "&mobile=" + mobile + "&logname=" + logname + "&corpName=" + corpName +
"&userType=" + userType + "&lockState=" + lockState + "&checkState=" + checkState + "&startTime=" + startTime + "&endTime=" + endTime + "&serviceCount=" + serviceCount);
});
$("#LogAmountDESC").click(function () {
$("#LogAmountDESC").attr("href", "/Users/Index?orderstr=LogAmount DESC&userName=" + userName + "&name=" + name + "&mobile=" + mobile + "&logname=" + logname + "&corpName=" + corpName +
"&userType=" + userType + "&lockState=" + lockState + "&checkState=" + checkState + "&startTime=" + startTime + "&endTime=" + endTime + "&serviceCount=" + serviceCount);
});
//刷新
$("#research").click(function () {
userName = $("#userName").val();
name = $("#name").val();
mobile = $("#mobile").val();
logname = $("#logname").val();
corpName = $("#corpName").val();
userType = $("#userType").val();
lockState = $("#lockState").val();
checkState = $("#checkState").val();
startTime = $("#startTime").val();
endTime = $("#endTime").val();
serviceCount = $("#serviceCount").val();
window.location.href = "/Users/Index/?userName=" + userName + "&name=" + name + "&mobile=" + mobile + "&logname=" + logname + "&corpName=" + corpName +
"&userType=" + userType + "&lockState=" + lockState + "&checkState=" + checkState + "&startTime=" + startTime + "&endTime=" + endTime + "&serviceCount=" + serviceCount;
});
});
</script>
@*@using (Html.BeginForm("Index", "Users", FormMethod.Post, new {enctype = "multipart/form-data" }))
{*@
<div class="wrapper wrapper-content animated fadeInRight">
<div class="right_top">
<span class="wen">用户列表</span>
<input id="research" name="research" type="button" value="刷新" class="seach-dashuju" />
<a class="anniu-dashuju4" href="###" src="Users/AddUser" index="UserAdd" onclick="parent.addMenuTab(this);">+添加用户</a>
@*@Html.ActionLink("+添加用户", "AddUser", new { rturl = @Server.HtmlEncode(Request.RawUrl) }, new { @class = "lan", style = "float:left" })*@
@*@Html.ActionLink("+批量导入", "UserImport", new { rturl = @Server.HtmlEncode(Request.RawUrl) }, new { style = "float:right;margin-right:1px; font-size:13px; font-weight:normal; line-height:38px; text-align:right;" })*@
</div>
<div class="right_tex">
<div class="table-responsive">
<ul>
<table width="100%" class="table-hover index_tab2_6" border="0" cellpadding="0" cellspacing="0" frame="void" >
<tr>
<td >
用户名
</td>
<td>
<label>
<input type="text" id="userName" name="userName" value="@Request.QueryString["userName"]" />
</label>
</td>
<td >
姓名
</td>
<td>
<label>
<input type="text" id="name" name="name" value="@Request.QueryString["name"]" />
</label>
</td>
<td >
业务员
</td>
<td>
<label>
<input type="text" id="logname" name="logname" value="@Request.QueryString["logname"]" onkeyup="value=value.replace(/[^\d]/g,‘‘) " onbeforepaste="clipboardData.setData(‘text‘,clipboardData.getData(‘text‘).replace(/[^\d]/g,‘‘))" />
</label>
</td>
</tr>
<tr>
<td >
企业名称
</td>
<td>
<label>
<input type="text" id="corpName" name="corpName" value="@Request.QueryString["corpName"]" />
</label>
</td>
<td >
会员类型
</td>
<td>
<label>
@Html.DropDownList("userType", (IEnumerable<SelectListItem>)ViewData["userType"], new { Class = "label_1" })
</label>
</td>
<td >
锁定状态
</td>
<td>
<label>
@Html.DropDownList("lockState", (IEnumerable<SelectListItem>)ViewData["lockState"], new { Class = "label_1" })
</label>
</td>
</tr>
<tr>
<td >
审核状态
</td>
<td>
<label>
@Html.DropDownList("checkState", (IEnumerable<SelectListItem>)ViewData["checkState"], new { Class = "label_1" })
</label>
</td>
<td >
到期时间
</td>
<td>
<label>
@Html.TextBox("startTime", "", new { style = "width:100px;", @class = "wdate", onfocus = "WdatePicker()" })
- @Html.TextBox("endTime", "", new { style = "width:100px;", @class = "wdate", onfocus = "WdatePicker()" })
</label>
</td>
<td colspan="2">
<input id="search" name="search" type="button" value="搜索" class="seach-dashuju" />
</td>
</tr>
</table>
</ul>
<ul>
<table width="100%" class="table-hover index_tab2_1 dashuju_middle" border="0" cellpadding="0" cellspacing="0">
<tr class="index_tab2_1_tel">
<td width="25px;">
<strong>
<input id="cbx" type="checkbox" name="mmAll" onclick="checkAll(this, ‘mm‘)" style="vertical-align:middle;" />
</strong>
</td>
<td align="center">
用户名
</td>
<td align="center">
姓名
</td>
@*<td align="center">
客户端类型
</td>*@
<td align="center" width="150px">
企业名称
</td>
<td align="center">
业务员
</td>
<td align="center">
会员类型
</td>
<td align="center">
注册时间
</td>
@*<td align="center" width="100px;">
最后登录时间
</td>*@
<td align="center">
到期时间
<span class="on" style="margin-top:-15px;">
@*margin-left:5px;*@
<a href="" id="ExpiredDateASC" onclick=‘aa()‘ style="border: 0px #e7e7e8 solid;height:0px;line-height: 0px;">
<i class="angle_top"></i>
</a>
<a href="" id="ExpiredDateDESC" style="border: 0px #e7e7e8 solid;height:0px;line-height: 0px;">
@*margin-top:-5px;*@
<i class="angle_bottom"></i>
</a>
</span>
</td>
<td align="center">
登录次数
<span class="on" style="margin-top:-15px;">
@*margin-left:5px;*@
<a href="" id="LogAmountASC" style="border: 0px #e7e7e8 solid;height:0px;line-height: 0px;">
<i class="angle_top"></i>
</a>
<a href="" id="LogAmountDESC" style="border: 0px #e7e7e8 solid;height:0px;line-height: 0px;">
@*margin-top:-5px;*@
<i class="angle_bottom"></i>
</a>
</span>
</td>
<td align="center">
审核
</td>
@*<td align="center">
锁定
</td>*@
@*<td>
是否显示水印
</td>*@
@*<td align="center" width="85px;">
软件绑定
</td>*@
<td align="center">
Web绑定
</td>
<td align="center">
服务记录
</td>
<td align="center">
操作
</td>
</tr>
@if (Model.Count == 0)
{
<tr>
<td align="center" colspan="13">
<strong style="color:red">暂无相关数据</strong>
</td>
</tr>
}
else
{
foreach (UsersandServiceCount item in Model)
{
switch (item.LevelFlag)
{
case 1:
<tr onmousemove="mousemove(this)" onmouseout="mouseout(this)" style="font-size:14px">
<td>
@*<input type="checkbox" name="mm" value=‘@item.ID.ToString()‘ onclick="checkItem(this, ‘mmAll‘)" style="vertical-align:middle" />*@
@{
if (!AppConst.adminNameList.Contains(Identity.AdminIDByCookie))
{
switch (item.UserType)
{
case (int)UserType.正式会员:
<input type="checkbox" name="mm" value=‘@item.ID.ToString()‘ disabled="disabled" style="vertical-align:middle" />
break;
case (int)UserType.试用会员:
<input type="checkbox" name="mm" value=‘@item.ID.ToString()‘ onclick="checkItem(this, ‘mmAll‘)" style="vertical-align:middle" />
break;
default:
break;
}
}
else
{
<input type="checkbox" name="mm" value=‘@item.ID.ToString()‘ onclick="checkItem(this, ‘mmAll‘)" style="vertical-align:middle" />
}
}
</td>
<td align="center" >
@item.UserName
</td>
<td align="center" >
@item.Name
</td>
@*<td align="center" >
@((MemberType)item.MemberType)
</td>*@
@*<td >
@item.Mobile
</td>*@
<td title="@item.Company" align="center" width="150px" >
@item.Company
@*@(!string.IsNullOrEmpty(item.Company) && item.Company.Length > 4 ? item.Company.Substring(0, 4) + "..." : item.Company)*@
</td>
<td align="center" >
@item.LogName
</td>
<td align="center" >
@{
switch (item.UserType)
{
case (int)UserType.正式会员:
<span style="color:red">@((UserType)item.UserType)</span>
break;
case (int)UserType.试用会员:
<span>@((UserType)item.UserType)</span>
break;
default:
break;
}
}
</td>
<td align="center">
@item.Addtime.ToString("yyyy-MM-dd HH:mm:ss")
</td>
@*<td align="center" >
@item.LastLogTime.ToString("yyyy-MM-dd HH:mm:ss")
</td>*@
<td align="center" >
@if (DateTime.Now >= item.ExpiredDate)
{
<span style="color: Red">@item.ExpiredDate.ToString("yyyy-MM-dd")</span>
}
else
{
<span>@item.ExpiredDate.ToString("yyyy-MM-dd")</span>
}
</td>
<td align="center" >
@item.LogAmount.ToString()
@*@Html.ActionLink(@item.LogAmount.ToString(), "UserLogIndex", "Users", new { userName = item.UserName }, new { target = "_blank" })*@
</td>
<td align="center" >
@if (item.IsCheck == true)
{
<span>已审</span>
}
else
{
<span style="color: Red">未审</span>
}
</td>
@*<td align="center">
@Html.CheckBox("IsLock", item.IsLock, new { @disabled = "disabled", style = "vertical-align:middle" })
</td>*@
@*<td >
@Html.CheckBox("IsWaterMark", item.IsWaterMark, new { @disabled = "disabled", style = "vertical-align:middle" })
</td>*@
@*<td align="center">
@if (string.IsNullOrEmpty(item.SerialNumber))
{
@Html.CheckBox("BangDing", false, new { @disabled = "disabled", style = "vertical-align:middle" })
}
else
{
@Html.CheckBox("BangDing", true, new { @disabled = "disabled", style = "vertical-align:middle" })
}
</td>*@
<td align="center" >
@if (string.IsNullOrEmpty(item.WebSerialNumber))
{
@Html.CheckBox("WebBangDing", false, new { @disabled = "disabled", style = "vertical-align:middle" })
}
else
{
@Html.CheckBox("WebBangDing", true, new { @disabled = "disabled", style = "vertical-align:middle" })
}
</td>
<td align="center" >
@if (item.ServiceCount == 0)
{
<span style="color:red;">无</span>
}
else
{
<a class="J_menuItem" href="###" src="Users/UserServiceRecord?userID=@item.ID" title="@(item.UserName+"服务记录:"+(item.ServiceCount))" onclick="parent.addMenuTab(this);"><span>@item.ServiceCount</span></a>
}
</td>
<td align="left">
<a class="J_menuItem" href="###" src="Users/EditUser?userid=@item.ID" onclick="parent.addMenuTab(this);">编辑</a>
@if (!AppConst.adminNameList.Contains(Identity.AdminIDByCookie))
{
switch (item.UserType)
{
case (int)UserType.正式会员:
<label disabled="disabled" style="color:gray">删除</label>
break;
case (int)UserType.试用会员:
<a href="#" onclick=‘DeleteUser("@item.ID.ToString()")‘>删除</a>
break;
default:
break;
}
}
else
{
<a href="#" onclick=‘DeleteUser("@item.ID.ToString()")‘>删除</a>
}
<a class="J_menuItem" href="###" src="Users/AuthorUser?userid=@item.ID" onclick="parent.addMenuTab(this);">授权</a>
<a class="J_menuItem" href="###" src="Users/AdminOperationUserLog?userID=@item.ID&flag=用户列表" onclick="parent.addMenuTab(this);">日志</a>
<a href="#" onclick=‘WebUnbundling("@item.ID.ToString()")‘>Web解绑</a>
<br />
<a class="J_menuItem" href="###" src="Users/SubsidiaryAccount?userID=@item.ID" onclick="parent.addMenuTab(this);">新增附属账号</a>
<a class="J_menuItem" href="###" src="Users/UserVisitLog_LoginFail?userName=@item.UserName" onclick="parent.addMenuTab(this);">登录失败日志</a>
<a href="#" onclick=‘Unbundling ("@item.ID.ToString()")‘>软件解绑</a>
<br />
@* @Html.ActionLink("涨跌关注", "Index", "UsersLinkAPPMarket", new { UserName = @item.UserName }, new { target = "_blank" }) *@
<a class="J_menuItem" href="###" src="Users/UserServiceRecord?userID=@item.ID" onclick="parent.addMenuTab(this);">服务记录</a>
<a class="J_menuItem" href="###" src="Users_DIYContrast/AddContrast?UserName=@item.UserName" onclick="parent.addMenuTab(this);">自定义对比组</a>
<a class="J_menuItem" href="###" src="UsersLinkFutures/Index?UserName=@item.UserName" onclick="parent.addMenuTab(this);">期货关注列表</a>
</td>
</tr>
break;
case 2:
<tr onmousemove="mousemove(this)" onmouseout="mouseout(this)" style="font-size:10px;">
<td bgcolor="#f6f1f1" align="center">
@*<input type="checkbox" name="mm" value=‘@item.ID.ToString()‘ onclick="checkItem(this, ‘mmAll‘)" style="vertical-align:middle" />*@
@{
if (!AppConst.adminNameList.Contains(Identity.AdminIDByCookie))
{
switch (item.UserType)
{
case (int)UserType.正式会员:
<input type="checkbox" name="mm" value=‘@item.ID.ToString()‘ disabled="disabled" style="vertical-align:middle" />
break;
case (int)UserType.试用会员:
<input type="checkbox" name="mm" value=‘@item.ID.ToString()‘ onclick="checkItem(this, ‘mmAll‘)" style="vertical-align:middle" />
break;
default:
break;
}
}
else
{
<input type="checkbox" name="mm" value=‘@item.ID.ToString()‘ onclick="checkItem(this, ‘mmAll‘)" style="vertical-align:middle" />
}
}
</td>
<td bgcolor="#f6f1f1" >
└ @item.UserName
</td>
<td align="center" bgcolor="#f6f1f1" >
@item.Name
</td>
@*<td align="center" bgcolor="#f6f1f1" >
@((MemberType)item.MemberType)
</td>*@
@*<td >
@item.Mobile
</td>*@
<td align="center" bgcolor="#f6f1f1" title="@item.Company" width="150px" >
@item.Company
@*@(!string.IsNullOrEmpty(item.Company) && item.Company.Length > 4 ? item.Company.Substring(0, 4) + "..." : item.Company)*@
</td>
<td align="center" bgcolor="#f6f1f1" >
@item.LogName
</td>
<td align="center" bgcolor="#f6f1f1" >
@{
switch (item.UserType)
{
case (int)UserType.正式会员:
<span style="color:red">@((UserType)item.UserType)</span>
break;
case (int)UserType.试用会员:
<span>@((UserType)item.UserType)</span>
break;
default:
break;
}
}
</td>
<td align="center" bgcolor="#f6f1f1">
@item.Addtime.ToString("yyyy-MM-dd HH:mm:ss")
</td>
@*<td align="center" bgcolor="#f6f1f1" >
@item.LastLogTime.ToString("yyyy-MM-dd HH:mm:ss")
</td>*@
<td align="center" bgcolor="#f6f1f1" >
@if (DateTime.Now >= item.ExpiredDate)
{
<span style="color: Red">@item.ExpiredDate.ToString("yyyy-MM-dd")</span>
}
else
{
<span>@item.ExpiredDate.ToString("yyyy-MM-dd")</span>
}
</td>
<td align="center" bgcolor="#f6f1f1" >
@item.LogAmount.ToString()
@*@Html.ActionLink(@item.LogAmount.ToString(), "UserLogIndex", "Users", new { userName = item.UserName })*@
</td>
<td align="center" bgcolor="#f6f1f1" >
@if (item.IsCheck == true)
{
<span>已审</span>
}
else
{
<span style="color: Red">未审</span>
}
</td>
@*<td align="center" bgcolor="#f6f1f1">
@Html.CheckBox("IsLock", item.IsLock, new { @disabled = "disabled", style = "vertical-align:middle" })
</td>*@
@* <td align="center" bgcolor="#f6f1f1">
@Html.CheckBox("IsWaterMark", item.IsWaterMark, new { @disabled = "disabled", style = "vertical-align:middle" })
</td>*@
@*<td align="center" bgcolor="#f6f1f1">
@if (string.IsNullOrEmpty(item.SerialNumber))
{
@Html.CheckBox("BangDing", false, new { @disabled = "disabled", style = "vertical-align:middle" })
}
else
{
@Html.CheckBox("BangDing", true, new { @disabled = "disabled", style = "vertical-align:middle" })
}
</td>*@
<td align="center" bgcolor="#f6f1f1" >
@if (string.IsNullOrEmpty(item.WebSerialNumber))
{
@Html.CheckBox("WebBangDing", false, new { @disabled = "disabled", style = "vertical-align:middle" })
}
else
{
@Html.CheckBox("WebBangDing", true, new { @disabled = "disabled", style = "vertical-align:middle" })
}
</td>
<td align="center" bgcolor="#f6f1f1" >
@if (item.ServiceCount == 0)
{
<span style="color:red;">无</span>
}
else
{
<a target="_blank" href="/Users/UserServiceRecord?userID=@item.ID"><span>@item.ServiceCount</span></a>
}
</td>
<td align="left" bgcolor="#f6f1f1">
<a class="J_menuItem" href="###" src="Users/EditUser?userid=@item.ID" onclick="parent.addMenuTab(this);">编辑</a>
@if (!AppConst.adminNameList.Contains(Identity.AdminIDByCookie))
{
switch (item.UserType)
{
case (int)UserType.正式会员:
<label disabled="disabled" style="color:gray">删除</label>
break;
case (int)UserType.试用会员:
<a href="#" onclick=‘DeleteUser("@item.ID.ToString()")‘>删除</a>
break;
default:
break;
}
}
else
{
<a href="#" onclick=‘DeleteUser("@item.ID.ToString()")‘>删除</a>
}
<a class="J_menuItem" href="###" src="Users/AuthorUser?userid=@item.ID" onclick="parent.addMenuTab(this);">授权</a>
<a class="J_menuItem" href="###" src="Users/AdminOperationUserLog?userID=@item.ID&flag=用户列表" onclick="parent.addMenuTab(this);">日志</a>
<a href="#" onclick=‘WebUnbundling("@item.ID.ToString()")‘>Web解绑</a>
<br />
<a class="J_menuItem" href="###" src="Users/UserVisitLog_LoginFail?userName=@item.UserName" onclick="parent.addMenuTab(this);">登录失败日志</a>
<a class="J_menuItem" href="###" src="Users/UserServiceRecord?userID=@item.ID" onclick="parent.addMenuTab(this);">服务记录</a>
@* @Html.ActionLink("涨跌关注", "Index", "UsersLinkAPPMarket", new { UserName = @item.UserName }, new { target = "_blank" }) *@
<a href="#" onclick=‘Unbundling ("@item.ID.ToString()")‘>软件解绑</a>
<br />
<a class="J_menuItem" href="###" src="Users_DIYContrast/AddContrast?UserName=@item.UserName" onclick="parent.addMenuTab(this);">自定义对比组</a>
<a class="J_menuItem" href="###" src="UsersLinkFutures/Index?UserName=@item.UserName" onclick="parent.addMenuTab(this);">期货关注列表</a>
</td>
</tr>
break;
}
}
}
</table>
</ul>
</div>
@*分页*@
<ul class="pager">
@{
if (Model.TotalItemCount == 0)
{
}
else
{
<li style="height:40px;">
@Html.Pager(Model, new PagerOptions
{
PageIndexParameterName = "id",
Id = "htmlPager",
ContainerTagName = "ul",
CssClass = "pagination",
CurrentPagerItemTemplate = "<li class=\"active\"><a href=\"#\">{0}</a></li>",
DisabledPagerItemTemplate = "<li class=\"disabled\"><a>{0}</a></li>",
PagerItemTemplate = "<li>{0}</li>",
PageIndexBoxId = "pagebox",
GoToButtonId = "goBtn"
})
</li>
<li style="width:15%; margin: 5px 10px;">
<div class="input-group">
<span class="input-group-addon">转到第</span>
<input type="text" id="pagebox" class="form-control input-sm" style="height: 32px;" />
<span class="input-group-addon" style="border-left:0px;">页</span>
<span class="input-group-btn" style="line-height: 22px;"><button class="btn btn-primary btn-sm" id="goBtn" style="height:32px;">跳转</button></span>
</div>
</li>
<li class="pagerrecord">
共 @Model.TotalItemCount 条记录, @Model.CurrentPageIndex/@Model.TotalPageCount 页
</li>
}
}
</ul>
<ul style="clear: both;">
<table width="100%" class="table-hover index_tab2_1" border="0" cellpadding="0" cellspacing="0">
<tr >
<td width="100px">
<strong>到期时间:</strong>
</td>
<td width="150px">
@Html.TextBox("EndDate", "", new { style = "width:120px;", @class = "wdate", onfocus = "WdatePicker()" })
</td>
<td>
@*@if (Identity.AdminIDByCookie != AppConst.adminName)
{
<label disabled="disabled" style="color:gray">修改到期时间</label>
}
else
{
<a onclick=‘UpdateEndDate()‘ style="cursor: pointer;">修改到期时间</a>
}*@
<a onclick=‘UpdateEndDate()‘ style="cursor: pointer;">修改到期时间</a>
</td>
<td>
@*@if (Identity.AdminIDByCookie != AppConst.adminName)
{
<label disabled="disabled" style="color:gray">批量删除</label>
}
else
{
<a onclick=‘DelAll()‘ style="cursor: pointer;">批量删除</a>
}*@
<a onclick=‘DelAll()‘ style="cursor: pointer;">批量删除</a>
</td>
<td>
<a onclick=‘DoCheck()‘ style="cursor: pointer;">确认审核</a>
</td>
<td>
<a onclick=‘IsNotCheck()‘ style="cursor: pointer;">取消审核</a>
</td>
<td>
<a onclick=‘UnbundlingAll()‘ style="cursor: pointer;">Web批量解绑</a>
</td>
</tr>
</table>
</ul>
<br />
<ul>
<font color="red">说明</font>:一台电脑只能登录一个账号,如果想登录另个账号请先解除绑定。
<br />
此账号已在另台终端上登录的情况:
<br />
1、此账号在其他终端上已登录过,解绑即可。
<br />
2、此台终端已登录过其他账号。需要解除已登录过的账号和现在要登录的账号。
<br />
3、浏览器必须支持cookie使用,如果清除浏览器 cookie后需要解绑才能登录
<br />
4、一个浏览器允许登录多个账号,但只支持一个账号同时在线。
</ul>
</div>
</div>
标签:trap 灵活 views rtti market 简洁 disable 概述 直接
原文地址:https://www.cnblogs.com/gujianli/p/12886764.html