|
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><input type="text" id="name"/></td></tr>
<tr><td><span>Giá</span></td><td><input type="text" style="width: 100px"/>đến
<input type="text" style="width: 100px"/></td></tr>
<tr><td><span>Hệ điều hành</span></td><td></td></tr>
<tr><td><span>Nhà sản xuất</span></td></tr>
<tr><td><input type="button" onclick="TimNangCao()" value="Tìm nâng cao"/></td></tr>
</table>
}
<div class="portfolio_1_4">
<ul id="list">
@foreach (var item in Model)
{
if (item.ChiTietDT != null)
{
<!-- START PORTFOLIO COLUMN #1 -->
<li id="id-1" class="app"><span class="image"><a href= "@item.HinhAnh" data-rel="prettyPhoto" class="img-thumb">
<img class="portfolio_image" src="@item.HinhAnh" alt="" /></a> </span><span class="title">@Html.ActionLink(item.TenSanPham, "Details", new { id = item.MaSanPham })</span>
<span class="description">@Html.DisplayFor(modelItem => item.Gia)<br />
Đặt hàng<br />
@Html.ActionLink("Edit", "Edit", new { id = item.MaSanPham }) |
@Html.ActionLink("Details", "Details", new { id = item.MaSanPham }) |
@Html.ActionLink("Delete", "Delete", new { id = item.MaSanPham })
</span><span class="clear padding15"></span></li>
<!-- END PORTFOLIO COLUMN #1 -->
}
}
</ul>
<div class="clear">
</div>
</div>
<div>
Page @(Model.PageCount < Model.PageNumber ? 0 : Model.PageNumber)
of @Model.PageCount
@if (Model.HasPreviousPage)
{
@Html.ActionLink("<<", "IndexDT", new { page = 1, sortOrder = ViewBag.CurrentSort, currentFilter=ViewBag.CurrentFilter })
@Html.Raw(" ");
@Html.ActionLink("< Prev", "IndexDT", new { page = Model.PageNumber - 1, sortOrder = ViewBag.CurrentSort, currentFilter=ViewBag.CurrentFilter })
}
else
{
@:<<
@Html.Raw(" ");
@:< Prev
}
@if (Model.HasNextPage)
{
@Html.ActionLink("Next >", "IndexDT", new { page = Model.PageNumber + 1, sortOrder = ViewBag.CurrentSort, currentFilter=ViewBag.CurrentFilter })
@Html.Raw(" ");
@Html.ActionLink(">>", "IndexDT", new { page = Model.PageCount, sortOrder = ViewBag.CurrentSort, currentFilter=ViewBag.CurrentFilter })
}
else
{
@:Next >
@Html.Raw(" ")
@:>>
}
</div>
in only search one data
please suggest for me how to search more data
thank you !
|
|
|
|
|
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.
|
|
|
|
|
I was handed a "precompiled" asp.net app source code. OK, how do I make this such that I can use and debug it? How do I compile a precompiled app?
http://i67.photobucket.com/albums/h292/Athono/precompiled_zps65b526bf.png
After I click past this window, and i try to build the application, I get an error that says "This application is already precompiled".
What can I do?
|
|
|
|
|
Sir;
look if this page[^] helps or try to delete 'PrecompiledApp.config'
Help people,so poeple can help you.
|
|
|
|
|
Hi Sirs,
Recently i heard about Light Switch from one of the blog,can any body tell me why its not that much used ?
|
|
|
|
|
|
I think part of the problem is the demos never really worked right. That's a pretty bad way to market something. The post referenced about how to get an answer does not define what we can and can't discuss on this forum. We used to have discussions here. Some of us are still open to it.
|
|
|
|
|
|
Thank you
|
|
|
|
|
Hi,
It's my project in ASP.Net...Any how successfully learned to display the pag contents by text...
But when I try to display multiple Images, I don't know which control will help me...
When I search Google for good design.. I found the below link has better, attarctive for me
http://areej-group.net
It displays 5 or 6 images alternatively changing the images on start-up page...
So which control can achieve it ?
Thanks for the ideas...
Thanks & Regards
Paramu @ Paranthaman
|
|
|
|
|
I think it's not about ASP.NET. You need Javascript to control it. There are many ways to achieve it, but there is a very easy way using jQuery as described here[^]
|
|
|
|
|
Thank you
|
|
|
|
|
Thanks a lot! you also resolve my problem.
|
|
|
|
|
You can use AdRotator Control which is used for displaying multiple images in ASP.NET website or for better optimization , you can use jquery banner plugin like :- WowSlider etc.
Ecommerce Website Design
Prasad Solutions Pvt. Ltd
508, Madhuban Building, Nehru Place, New Delhi - 110019
Visit-http://www.prasad-solutions.com
|
|
|
|
|
|
Dear friend,
I need a help for creating two web parts in a single web page and if i change any data in first web part the second web part also data have to change. plz help me to do.. Thank u..
|
|
|
|
|
any body tell
me about url-rewriting
i want to mak a page run time and edit the page run time
how can i do this
|
|
|
|
|
|
|
dear to all
i want to play vedio on my asp.net webpage and play in full screen
any body suggest me how can i do this
|
|
|
|
|
hey..u cn use iframe tags in your aspx page and try to play a youtube vid..smthing like below:
have a try..
regards
|
|
|
|
|
You can embed the youtube video with the following code:
<object width="320" height="180">
<param name="movie" value="http://www.youtube.com/v/9bZkp7q19f0&hl=en_GB&fs=1&"></param>
<param name="allowFullScreen" value="true"></param>
<param name="allowscriptaccess" value="always"></param>
<embed src="http://www.youtube.com/v/9bZkp7q19f0&hl=en_GB&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="320" height="180" wmode="transparent"></embed></object>
|
|
|
|
|
|
I need to be able to take items no longer avaalble or renamed and issue a page 410 error.
The page is dynamic, a single page that uses query strings to load the item.
So I double check to make sure the item exists, and if not, draw a panel that give the user a message, but I want to send a message to the crawler saying the same thing.
I'm looking for suggestions or tips, but so far I have the code below, but I think it needs improvement.
HttpContext.Current.Response.TrySkipIisCustomErrors = True
HttpContext.Current.Response.StatusCode = 410
HttpContext.Current.Response.StatusDescription = "Product item does not exist or has been moved or renamed"
HttpContext.Current.Response.Write(HttpContext.Current.Response.StatusCode)
HttpContext.Current.Response.Write(HttpContext.Current.Response.StatusDescription)
Me.Page.Header.Title = rm.GetString("Page Error 410 - This item is no longer available and has been removed or relisted")
|
|
|
|
|
Hello,
How we can change our complete dynamic asp.net website in to simple HTML?
Just we made new website in asp.net but now want to change complete website in html. Any way how we can change?
|
|
|
|