Advanced search
-
i have code
[AllowAnonymous]
public ActionResult IndexDT(int? page, string sortOrder, string currentFilter, string searchString)
{
ViewBag.CurrentSort = sortOrder;
ViewBag.NameSortParm = String.IsNullOrEmpty(sortOrder) ? "TenSanPham desc" : "";
ViewBag.CostSortParm = sortOrder == "Gia" ? "Gia desc" : "Gia";
if (Request.HttpMethod == "GET")
{
searchString = currentFilter;
}
else
{
page = 1;
}
ViewBag.CurrentFilter = searchString;
int pageSize = 2;
int pageNumber = (page ?? 1);
return View(spBLL.ListDT(searchString, sortOrder).ToPagedList(pageNumber, pageSize));
}@model PagedList.IPagedList<ComputerBLL.SanPham>
@{
ViewBag.Title = "IndexDT";
}
<script src="../../Scripts/jquery-1.7.1.js" type="text/javascript"></script>
<script src="../../Scripts/jquery-ui-1.8.20.js" type="text/javascript"></script>
<script src="../../Scripts/jquery.unobtrusive-ajax.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
$("#timKiemNangCao").click(function () {
$("#search").after('');
});
});function TimNangCao() { var sanpham = new Object(); sanpham.TenSanPham = $("#name").val(); $.ajax({ type: "POST", url: '../../SanPham/TimKiemNangCao', data: JSON.stringify(sanpham), contentType: 'application/json; charset=utf-8', success: function (data) { $(document).html(data); }, error: function (xhr) { alert(xhr.toString()); } }); }
</script>
<h2>Index</h2><p>
@Html.ActionLink("Create New", "CreateDT")
</p>@using (Html.BeginForm())
{
<p id="search">
Find by name: @Html.TextBox("SearchString", ViewBag.CurrentFilter as string)
<input type="submit" value="Search" />
<a style="color:Blue; cursor:pointer" id="timKiemNangCao">Tìm kiếm nâng cao</a>
</p>
<table style="text-align:left">
<tr><td><span>Tên sản phẩm</span></td><td>< -
i have code
[AllowAnonymous]
public ActionResult IndexDT(int? page, string sortOrder, string currentFilter, string searchString)
{
ViewBag.CurrentSort = sortOrder;
ViewBag.NameSortParm = String.IsNullOrEmpty(sortOrder) ? "TenSanPham desc" : "";
ViewBag.CostSortParm = sortOrder == "Gia" ? "Gia desc" : "Gia";
if (Request.HttpMethod == "GET")
{
searchString = currentFilter;
}
else
{
page = 1;
}
ViewBag.CurrentFilter = searchString;
int pageSize = 2;
int pageNumber = (page ?? 1);
return View(spBLL.ListDT(searchString, sortOrder).ToPagedList(pageNumber, pageSize));
}@model PagedList.IPagedList<ComputerBLL.SanPham>
@{
ViewBag.Title = "IndexDT";
}
<script src="../../Scripts/jquery-1.7.1.js" type="text/javascript"></script>
<script src="../../Scripts/jquery-ui-1.8.20.js" type="text/javascript"></script>
<script src="../../Scripts/jquery.unobtrusive-ajax.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
$("#timKiemNangCao").click(function () {
$("#search").after('');
});
});function TimNangCao() { var sanpham = new Object(); sanpham.TenSanPham = $("#name").val(); $.ajax({ type: "POST", url: '../../SanPham/TimKiemNangCao', data: JSON.stringify(sanpham), contentType: 'application/json; charset=utf-8', success: function (data) { $(document).html(data); }, error: function (xhr) { alert(xhr.toString()); } }); }
</script>
<h2>Index</h2><p>
@Html.ActionLink("Create New", "CreateDT")
</p>@using (Html.BeginForm())
{
<p id="search">
Find by name: @Html.TextBox("SearchString", ViewBag.CurrentFilter as string)
<input type="submit" value="Search" />
<a style="color:Blue; cursor:pointer" id="timKiemNangCao">Tìm kiếm nâng cao</a>
</p>
<table style="text-align:left">
<tr><td><span>Tên sản phẩm</span></td><td><I am not going to read through all of your code to try and make sense of it. Please narrow down to what specific lines of code are relevant and also explain why you are having a hard time.
There are only 10 types of people in the world, those who understand binary and those who don't.