Search Functionality In ASP.NET MVC | Using Jquery Ajax

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 พ.ย. 2024

ความคิดเห็น • 37

  • @desta7589
    @desta7589 2 ปีที่แล้ว

    Thanks Bro, I love your Tutorial!

  • @aniqanaseer4729
    @aniqanaseer4729 11 หลายเดือนก่อน

    Hey. I love your video. I want to download the source code but I am not getting access to the drive. Can you allow me?

  • @mohammadsafaee2093
    @mohammadsafaee2093 4 ปีที่แล้ว +1

    Thanks for this

    • @abctutorial
      @abctutorial  4 ปีที่แล้ว

      Welcome keep subscribe

  • @aysansoft
    @aysansoft 8 หลายเดือนก่อน

    hi bro tnq for video. but i have a question and problem.
    "حذف" +
    i write this code for Action buttons in Javascript codes but when searching Done. value.Id return nothing.
    how can resolve this problem ?
    please help

  • @domagojhamzic9892
    @domagojhamzic9892 4 ปีที่แล้ว +1

    Great tutorial, cheers mate :)

    • @abctutorial
      @abctutorial  4 ปีที่แล้ว

      Thxs... Keep subscribe
      For any help please post www.abctutorial.com/community

  • @anbuanbu6591
    @anbuanbu6591 6 ปีที่แล้ว +1

    Hi bro,
    How to restrict access the jquery ajax method from browser console window...
    The problem is: everyone can just go to the console and make a loop around it and make that request a thousand time. how can i deal with this security problem.

  • @hiteshtekwani705
    @hiteshtekwani705 5 ปีที่แล้ว +1

    what is studentinfoes in contoller??

    • @abctutorial
      @abctutorial  5 ปีที่แล้ว

      Its a Table allies name

  • @nouramer18
    @nouramer18 5 ปีที่แล้ว +1

    why when i write in the view IEnumberable........ not appear and give me error when run

    • @abctutorial
      @abctutorial  5 ปีที่แล้ว +1

      Please download my project and you will get it properly

  • @Rawan-bq3bo
    @Rawan-bq3bo 6 ปีที่แล้ว

    Thanks for this great tutorial, I have question please,
    If we have 3 tables: first is your table (StudentInfo) and second courses table and third table is Stud_Courses
    that contains 2 columns (Stu_ID, Cou_ID)
    to assign courses for each student for example (stud_ID(1)--->cou_ID(1) stud_ID(1)--->cou_ID(2)) my question if the user want
    to search about certain course to know what student name take this course,,, how to implement this in your view? plese help me

    • @abctutorial
      @abctutorial  6 ปีที่แล้ว

      very simple logic bro.... use the below logic in your controller
      StuList = db.Stud_Courses.where(x=>x.Stu_ID == stuId && x.cou_ID == couId).ToList();

    • @Rawan-bq3bo
      @Rawan-bq3bo 6 ปีที่แล้ว +1

      Thank you very very much, I'm so sorry but how to get stuId from Student List?

    • @abctutorial
      @abctutorial  6 ปีที่แล้ว

      i don't understand your question,please ask your question clearly. Your Can also Post your problem in Detail ,in our facebook group
      link : facebook.com/groups/1277069242439068/
      thank you

    • @Rawan-bq3bo
      @Rawan-bq3bo 6 ปีที่แล้ว +1

      Ok, I will create facebook account now

  • @KL-qe7zr
    @KL-qe7zr 7 ปีที่แล้ว +1

    Hey bro, I tried using this searchbox to implement into the CRUD Operations Jquery Ajax project... now my table isn't showing anymore with data in it?

    • @abctutorial
      @abctutorial  7 ปีที่แล้ว

      Follow our video Starting to ending ......... i hope you will be able to do this ..........
      If you wants to arrange any discussion about your issue also you can post on our group facebook.com/groups/1277069242439068/?ref=br_rs

    • @KL-qe7zr
      @KL-qe7zr 7 ปีที่แล้ว +1

      It was working yesterday but idk why now my data isn't showing anymore on the table. All of my code looks correct... idk what to do anymore.

    • @abctutorial
      @abctutorial  7 ปีที่แล้ว

      Please can you post your inspect browser screenshoot to our above facebook page or share your code with us? will try to recover

    • @KL-qe7zr
      @KL-qe7zr 7 ปีที่แล้ว

      Hey brother..I figured it out. I was getting an error 404 to the jquery.min.js script...Looks like somebody changed it and I had to go tweak it. Table is now displaying. But can you help me with the search function? My model won't allow me to use IEnumerable for my model to create the foreach loop. Here is what I have.
      Search By :
      ID
      FirstName
      LastName
      Department
      IssueType
      HandledBy
      @Html.TextBox("Search")

      ID
      DateOfIssue
      Email
      FirstName
      LastName
      Department
      IssueType
      Severity
      Comments
      Attachments
      Status
      Resolution
      DateCompleted
      HandledBy
      Action(Edit)
      Action(Delete)

    • @KL-qe7zr
      @KL-qe7zr 7 ปีที่แล้ว +1

      My edit popup modal will give me errors if I use IEnumerable and foreach loop.

  • @hgtechvideos
    @hgtechvideos 4 ปีที่แล้ว +1

    not working with paging

    • @abctutorial
      @abctutorial  4 ปีที่แล้ว

      Yes.. For paging it will not work. Request for working copy with paging here www.abctutorial.com/community

  • @mariamidaline8907
    @mariamidaline8907 2 ปีที่แล้ว

    Failed to load resource: the server responded with a status of 500 ()

  • @akshathasm6471
    @akshathasm6471 4 ปีที่แล้ว

    Im getting a error in the line setdata.html("")
    The error is cannot read the property html of undefined
    Can u please help me

    • @fenidoshi3722
      @fenidoshi3722 4 ปีที่แล้ว +2

      Please try below code :-
      Please remove :- SetData.html("");
      $.ajax({
      type: "post",
      url: "/Home/GetSearchingData?SearchBy=" + SearchBy + "&SearchValue=" + SearchValue,

      contentType: "html",
      // contentType: "application/json",
      // dataType: 'json',
      success: function (result) {
      if (result.length == 0) {
      SetData.append('No Match Data')
      }
      else {
      $("#DataSearching").empty();
      $.each(result, function (index, value) {
      debugger
      var Data = "" +
      "" + value.StuId + ""
      "" + value.StuName + ""
      "" + value.Semester + ""
      "";
      //SetData.append(Data);
      // also comment this line
      // we have another option that is , to append the data
      var markup = "" + value.StuId + "" + value.StuName + "" + value.Semester + "";
      $("#DataSearching").append(markup);

      });
      }
      }
      });

  • @muhammadnumanarshad5645
    @muhammadnumanarshad5645 6 ปีที่แล้ว +2

    Not Working

    • @abctutorial
      @abctutorial  6 ปีที่แล้ว

      Where you facing the problem tell us

  • @anbujayachandran2984
    @anbujayachandran2984 5 ปีที่แล้ว

    not working

    • @anbujayachandran2984
      @anbujayachandran2984 5 ปีที่แล้ว +1

      @model IEnumerable

      SearchBy:

      Name
      ID

      @Html.TextBox("Search")



      StuId
      StudentNam
      Semester



      @foreach (var Item in Model)
      {

      @Item.StuId
      @Item.StudentName
      @Item.Semestor

      }


      @**@
      $(document).ready(function () {
      $("#SearchBtn").click(function () {
      var SearchBy = $("#SerachBy").val();
      var SearchValue = $("#Search").val();
      var SetData = $("#DataSearching").val();
      SetData.html("");
      $.ajax({
      type: "post",
      url: "/Home/GetSearchingData?SerachBy=" + SearchBy + "&SearchValue=" + SearchValue,
      contentType: "html",
      //contentType: "application/json; charset=utf-8",
      success: function (result) {
      if (result.length == 0) {
      SetData.append('No Match Data')
      }
      else {
      $.each(result, function (Index, value) {
      var Data = "" +
      "" + value.StuId + "" +
      "" + value.StudentName + "" +
      "" + value.Semestor + "" +
      "";
      SetData.append(Data);
      });
      }
      }
      });
      });
      });
      i tryed same conce[t but

    • @abctutorial
      @abctutorial  5 ปีที่แล้ว

      Where the problem actually? Download the code