Click here to Skip to main content
15,885,278 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Problem with accessing Asp.net web application through other system Pin
mkbisht26-Jun-13 18:21
mkbisht26-Jun-13 18:21 
AnswerRe: Problem with accessing Asp.net web application through other system Pin
arunmisra27-Jun-13 13:42
arunmisra27-Jun-13 13:42 
AnswerRe: Problem with accessing Asp.net web application through other system Pin
chakraproject27-Jun-13 18:56
chakraproject27-Jun-13 18:56 
QuestionHow to achieve this type of Images [ like animated waves over Images ] from AdobeFlasPlayer 11.7.700.224 on VS - 2010? Pin
Paramu197325-Jun-13 1:18
Paramu197325-Jun-13 1:18 
AnswerRe: How to achieve this type of Images [ like animated waves over Images ] from AdobeFlasPlayer 11.7.700.224 on VS - 2010? Pin
thanh_bkhn25-Jun-13 15:38
professionalthanh_bkhn25-Jun-13 15:38 
GeneralRe: How to achieve this type of Images [ like animated waves over Images ] from AdobeFlasPlayer 11.7.700.224 on VS - 2010? Pin
Paramu197329-Jun-13 23:35
Paramu197329-Jun-13 23:35 
QuestionCosuming UDDI webservice in Asp.Net Pin
prakash_21023-Jun-13 18:00
prakash_21023-Jun-13 18:00 
QuestionAdvanced search Pin
smile9x21-Jun-13 22:38
smile9x21-Jun-13 22:38 
i have code

C#
[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) &nbsp;
        <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
     &nbsp;
    @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
    }
     &nbsp;
    @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 !
SuggestionRe: Advanced search Pin
ZurdoDev28-Jun-13 9:50
professionalZurdoDev28-Jun-13 9:50 
QuestionHow do you compile the precompiled? Pin
Xarzu20-Jun-13 15:38
Xarzu20-Jun-13 15:38 
AnswerRe: How do you compile the precompiled? Pin
Ali Al Omairi(Abu AlHassan)22-Jun-13 23:05
professionalAli Al Omairi(Abu AlHassan)22-Jun-13 23:05 
QuestionWhy LightSwitch not used much ? Pin
KK Kod20-Jun-13 4:41
KK Kod20-Jun-13 4:41 
AnswerRe: Why LightSwitch not used much ? Pin
Richard MacCutchan20-Jun-13 5:06
mveRichard MacCutchan20-Jun-13 5:06 
AnswerRe: Why LightSwitch not used much ? Pin
Jasmine250125-Jun-13 7:32
Jasmine250125-Jun-13 7:32 
AnswerRe: Why LightSwitch not used much ? Pin
MaulikDusara26-Jun-13 8:33
MaulikDusara26-Jun-13 8:33 
GeneralRe: Why LightSwitch not used much ? Pin
KK Kod26-Jun-13 17:36
KK Kod26-Jun-13 17:36 
QuestionHow to display the multiple images - VS 2010 ? Pin
Paramu197319-Jun-13 23:47
Paramu197319-Jun-13 23:47 
AnswerRe: How to display the multiple images - VS 2010 ? Pin
thanh_bkhn20-Jun-13 18:45
professionalthanh_bkhn20-Jun-13 18:45 
GeneralRe: How to display the multiple images - VS 2010 ? Pin
Paramu197321-Jun-13 20:33
Paramu197321-Jun-13 20:33 
GeneralRe: How to display the multiple images - VS 2010 ? Pin
David Kroj26-Jun-13 23:00
David Kroj26-Jun-13 23:00 
AnswerRe: How to display the multiple images - VS 2010 ? Pin
Prasad Solutions Pvt. Ltd.24-Jun-13 2:23
Prasad Solutions Pvt. Ltd.24-Jun-13 2:23 
GeneralRe: How to display the multiple images - VS 2010 ? Pin
Paramu197325-Jun-13 1:56
Paramu197325-Jun-13 1:56 
QuestionCreating Web Part in ASP.NET Pin
karthisomu18-Jun-13 18:54
karthisomu18-Jun-13 18:54 
Questionhow can i use url-re-writing Pin
umesh dwivedi kanpur18-Jun-13 18:35
professionalumesh dwivedi kanpur18-Jun-13 18:35 
AnswerRe: how can i use url-re-writing Pin
thanh_bkhn20-Jun-13 18:41
professionalthanh_bkhn20-Jun-13 18:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.