asp.net mvc - MVC 4 Paging Searching -
I have applied to the search pattern in your project, but I have action Index () and Aror (Controller Type the current request for 'AdultLiteracyTeachersController' action 'index' is ambiguous between the following action methods:
public view Result index (string Srcstring, string Wartmanfiltr, int? p) {if (Srcstring! = Null) {page = 1;} other {searchstring = currentFilter;} ViewBag.CurrentF Ilter = Searchstring; Var teacher Select DB = r. Adllaititi teachers in; if (! Stringkaisnlorektri (Srcstring)) {teachers = teachers.Where (r = & gt; r.ALTName.ToUpper (). (including Srcstraing. ToUpper ()));} teacher = teacher. Ordrbi (R = & gt; Ar.alktiktiknam); int pagesize = 10; Int page number = (page 1? 1); return (see teachers.ToPagedList (page not pages));} other ActionResult.index ()
public performance index () {var adulliteracyteachers = db. AdulLiteracyTeachers.Include (a = & gt; A. District); See Return (adulliteracyteachers.ToList ()); } The action result is used to call all the data, how can I expand in an index?
collect them:
public view-result index (string) Srcstring string Chalufiltr, Int? page) {if (Srcstresing == is not empty and amp; amp; amp; & amp; Wartmanfiltr == null & amp;; & amp ;! page. Hsvalu) {// no parameters, adulliteracyteachers = db.AdulLiteracyTeachers.Include (a => a.District); See Return (adulliteracyteachers.ToList ()); } // Regular code below if (searchstring! = Null) {page = 1; } Other {searchstring = currentFilter; } ViewBag.CurrentFilter = searchstring; Var teacher = db from Choose Adlitious Teachers R If (! String.IsnellOrthry (searchstring)) {teachers = teachers.Where (r = & gt; r.ALTName.ToUpper (.) Includes (SearchString.Update) ()); } Teacher = Teacher Orderbie (r = & gt; rtttname); Int pagesize = 10; Int page number = (Page 1?); See Return (teachers.ToPagedList (Pages, Pages)); }
Comments
Post a Comment