Part 16- Delete operation in ASP.NET MVC using JQuery and Bootstrap popup (Modal)

  Рет қаралды 47,155

Technotips Ashish

Technotips Ashish

Күн бұрын

Пікірлер: 84
@ArabicSaed
@ArabicSaed 6 жыл бұрын
I like your way of teaching .... you are a superman
@aapkanigam
@aapkanigam 6 жыл бұрын
+Saed Jomaa thanks keep learning and sharing
@d.choudhary2705
@d.choudhary2705 7 жыл бұрын
hi Ashish first of all congratulations to you for nice work. God bless. I request you to please upload more and more videos based on real time project example and try to clear MVC, jquery, LINQ, EF concept. your way of teaching very very good. please carry on. now our aspectation from you more. really appreciate your work.
@aapkanigam
@aapkanigam 7 жыл бұрын
+Dinesh Kumar thanks Dinesh ..keep learning and sharing
@d.choudhary2705
@d.choudhary2705 7 жыл бұрын
Technotips - Ashish I am waiting your more videos on MVC , jquery. please upload ASAP. I'm saying thanks bottom of my heart. I hope soon you'll upload.
@aapkanigam
@aapkanigam 7 жыл бұрын
+Dinesh Kumar Sure...
@kirankumari-nz8lr
@kirankumari-nz8lr 8 жыл бұрын
Wonderful video and so easy explaination .Thanks for giving such example. previously I was deleting the complete row it was deleted successfully but in my case the table was not having any relationship with other table.Should we need that extra column for handling such issue?
@aapkanigam
@aapkanigam 8 жыл бұрын
+kiran kumari Your welcome ! Yes we need to add one more extra column .We can delete the table row in case of dependencies. It will give an exception. Keep learning anf sharing ..
@tejaratahan949
@tejaratahan949 5 жыл бұрын
Dear Ashish Wait you for AspNet Core MVC! All things GREATE!!!
@mohamadahmad7600
@mohamadahmad7600 7 жыл бұрын
hi Ashish congratulations to you for Very Good work. I WISH YOU MAKE more videos based on real time project example and try to clear MVC, jquery, LINQ, EF concept. your way of teaching very very good THANK YOU VERY VERY MUCH
@aapkanigam
@aapkanigam 7 жыл бұрын
+asd asdf Thanks asd! If u find this useful then please share this among your friends.
@xhonb3436
@xhonb3436 4 жыл бұрын
The specified type member 'IsDeleted' is not supported in LINQ to Entities. why this problem occurs? Thank u if u reply.
@iggzyiggzy
@iggzyiggzy 6 жыл бұрын
Hi, great tutorials, thx for all of them :D . Q: Why don't you just pass list to View in Index method ? Like = return View(listEmp)
@aapkanigam
@aapkanigam 6 жыл бұрын
Thanks🤗
@Mudassariqbal884
@Mudassariqbal884 7 жыл бұрын
Have you given any tutorial of data migration in code first approach? actually i doing practice using code first approach so if you didn't give any tutorial please recommend me any tutorial which is best! Thanx!
@anshulbansal9059
@anshulbansal9059 6 жыл бұрын
Hey Ashish, just want to know one thing. why did you used this "Select(x => new employee { employee_id = x.employee_id, employee_name = x.employee_name, department_id = x.department_id })"? When I was using this then i was getting an exception and when i removed it, program ran. Is there any reason for this?
@kaushikbhadani4227
@kaushikbhadani4227 7 жыл бұрын
Very very nice Ashish.!!
@aapkanigam
@aapkanigam 6 жыл бұрын
+kaushik bhadani thank you!
@vastro7343
@vastro7343 4 жыл бұрын
nice work, thanks for sharing, really useful!!!!!
@FiazAhmad-jd5sq
@FiazAhmad-jd5sq 6 жыл бұрын
excelent explanation sir !
@aapkanigam
@aapkanigam 6 жыл бұрын
+Fiaz Ahmad thanks..keep learning and sharing
@haroonniaz7148
@haroonniaz7148 7 жыл бұрын
Dear sir ,in databse empoyee table you add Isdeleted column which datatype is given to IsDeleted coulmn?
@aapkanigam
@aapkanigam 7 жыл бұрын
+Haroon Niaz boolean (bit) type.
@haroonniaz7148
@haroonniaz7148 7 жыл бұрын
(x => x.IsDeleted == false && x.EmployeeId=EmployeeId); is still show error && operator canot applied on bool and int
@haroonniaz7148
@haroonniaz7148 7 жыл бұрын
thanks sir error remove and code execute
@kiranallam3583
@kiranallam3583 6 жыл бұрын
Good tutorial Ashish, while I am debugging ,I am not able to find the EmployeeId in the DeleteEmployee method parameter
@aapkanigam
@aapkanigam 6 жыл бұрын
Thanks.. You need to make sure whether you are getting employeeId while rendering data or not
@kiranallam3583
@kiranallam3583 6 жыл бұрын
yes I am getting the id in view but it is not passed to JSON method and one more thing while I am deleting the element, it is going to be deleted. as soon as i was refreshing the page same element is coming back in the view
@aapkanigam
@aapkanigam 6 жыл бұрын
Then you should check your jquery code how are you passing the ID in ajax call. Make sure the name of Id key should be exactly matches with the method's parameter name in your controller.
@kiranallam3583
@kiranallam3583 6 жыл бұрын
Ok Ashish Thank you
@sarangbhople403
@sarangbhople403 6 жыл бұрын
Hey Ashish, Nice Video Even helpful to me in My Live Project.
@AlmostDead
@AlmostDead 5 жыл бұрын
what is MVCTutorialEntities? can't find where its declared anywhere...
@badripn
@badripn 5 жыл бұрын
Hi Ashish. The ajax call in the script tag fails and as a result the modal window doesn't closes and the data is not getting removed. Can you pls. suggest. I am a newbie.
@aliraza66-h1b
@aliraza66-h1b 8 жыл бұрын
great work dear.....
@aapkanigam
@aapkanigam 8 жыл бұрын
+Ali Raza thanku very much!
@navzme
@navzme 6 жыл бұрын
Thanks for awesome video
@kuldeepkumar-en1fk
@kuldeepkumar-en1fk 7 жыл бұрын
Sir, Why you have used JSON. Please Explain
@aapkanigam
@aapkanigam 7 жыл бұрын
+kuldeep kumar where?
@kuldeepkumar-en1fk
@kuldeepkumar-en1fk 7 жыл бұрын
sir you have used "Jsonresult". please Explain.
@aapkanigam
@aapkanigam 7 жыл бұрын
+kuldeep kumar oh..this will give you data into JSON format..and this data will be received into ajax response.
@kuldeepkumar-en1fk
@kuldeepkumar-en1fk 7 жыл бұрын
thank you sir
@zahidulemon5058
@zahidulemon5058 7 жыл бұрын
sir why i use JsonResult ,return Json(result, JsonRequestBehavior.AllowGet) etc. can you please explain why we use Json for delete operation.
@aapkanigam
@aapkanigam 7 жыл бұрын
+Zahidul Emon through jquery when you select type as json the all request and response will be sent or recieved in json format.
@MrBobadil
@MrBobadil 7 жыл бұрын
How would we show in the modal, what record is going to be deleted? Do we need a partial view for that?
@aapkanigam
@aapkanigam 7 жыл бұрын
+MrBobadil If you want to display simple message then you can use modal with hard coded message ..but if you want to show complete value of that record then you need partial view with bootstrap modal
@lutforurc
@lutforurc 7 жыл бұрын
Dear Sir, Great video, but How can insert multiple data at a time. Please help me?
@aapkanigam
@aapkanigam 7 жыл бұрын
+Lutfor Rahman multiple datetime means..? use DateTime.Now for current date time
@lutforurc
@lutforurc 7 жыл бұрын
Dear Sir, I didn't mean datetime. I just said that how to insert multiple DATA at once using ajax.
@aapkanigam
@aapkanigam 7 жыл бұрын
+Lutfor Rahman Just use $.each function to send data one by one ..or create object of data and send to ajax
@lutforurc
@lutforurc 7 жыл бұрын
Thank you very much.
@sonthanh2977
@sonthanh2977 5 жыл бұрын
i love this tutoria
@ghadeerboland259
@ghadeerboland259 7 жыл бұрын
thanks your articles very helpfully :)
@aapkanigam
@aapkanigam 6 жыл бұрын
+Ghadeer Boland thanku
@carlosgabriel8568
@carlosgabriel8568 6 жыл бұрын
Hi, I'm using in my ajax succses "myModal".modal("hide") but after i complete my action(Add, Delete or edit) my moal dialog it's not closing, someone know's what's wrong?
@wellington18m
@wellington18m 4 жыл бұрын
When I delete the row. It is only gone if a refresh the page. How can I solve this, please help!
@jimboTTT
@jimboTTT 7 жыл бұрын
Thanks sir!
@duncanmcdonald5250
@duncanmcdonald5250 6 жыл бұрын
If, like me, you wonder how to set up the "FK_Sites_Employee" key that Ashish uses, but has not explained how to create, I'd advise going to the blog for Tut 28 and grabbing the database creation SQL. The database SQL attached to this tutorial does not successfully set up the foreign key for me.
@duncanmcdonald5250
@duncanmcdonald5250 6 жыл бұрын
You will also need to update the entity framework to include the new "IsDeleted" field in the Employee table. So open the "MVCTutorialModel.edmx" in the "Models" folder, right click and select "Update Model From Database", Select the "Refresh" tab and click the "Finish" button. Now build the project again and the Employees class will have the new "IsDeleted" member. But your EmployeeViewModel will need to be manually updated to know about this field. Also, don't expect this tutorial to actually DELETE anything from the table, it just updates and uses the new flag.
@narendarsingh4672
@narendarsingh4672 6 жыл бұрын
Great
@MrJos221
@MrJos221 7 жыл бұрын
What is the query you use to start 0 the column is delete?
@aapkanigam
@aapkanigam 6 жыл бұрын
+Jose Angel You can watch part 26 for this..
@muhammadalwi4842
@muhammadalwi4842 6 жыл бұрын
Hallo sir What is data type you used on Isdelete column ?
@aapkanigam
@aapkanigam 6 жыл бұрын
Bit in sql and boolean in c#
@muhammadalwi4842
@muhammadalwi4842 6 жыл бұрын
@@aapkanigam thanks you so much sir
@xhonb3436
@xhonb3436 4 жыл бұрын
'The specified type member 'IsDeleted' is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties are supported.' why this problem occurs?
@annuverma936
@annuverma936 6 жыл бұрын
why use json result on delete method why not action result ?
@list5s
@list5s 6 жыл бұрын
because it gives a data in JSON format that why use this JSON result
@mohammadfasih7752
@mohammadfasih7752 8 жыл бұрын
sir please explain little bit more this line...(viewBag.DepartmentList=new SelectList(List,"Departmentid","DepartmentName") what changes can i do if my table has no dependency with another tale
@aapkanigam
@aapkanigam 8 жыл бұрын
+Faizan Raza I have list of record in "List" in which I will have all columns.But here while taking it into ViewBag.DepartmentList I am taking list of two column only i.e. DepartmentName and DepartmentId .I will use this list to bind my Dropdown that needs only id and name. SelectList is like tag which contains Name and value .
@aapkanigam
@aapkanigam 8 жыл бұрын
+Faizan Raza No, this is just the list which will contains list of DepartmentId and its Name .
@nabeelsiddiqui7612
@nabeelsiddiqui7612 4 жыл бұрын
Your CODE BELOW LINk is not working? why Sir?
@tayyabjatoi8644
@tayyabjatoi8644 4 жыл бұрын
What is data type of IsDeleted in Sqlserver?
@aapkanigam
@aapkanigam 4 жыл бұрын
Choose bit in sql
@kinkmas
@kinkmas 6 жыл бұрын
Thank you :)
@asifjalal9260
@asifjalal9260 4 жыл бұрын
its not work for me. my modal just flashes not stop to get click on yes or no button
@mohitgangwar1191
@mohitgangwar1191 7 жыл бұрын
The AJAX request is sent and it works. But, It works only for the first time, it doesnt work from second time onwards. please give the solution
@aapkanigam
@aapkanigam 7 жыл бұрын
+Mohit Gangwar try to debug using inspect element in your browser . You will see some error.
@samzviews6315
@samzviews6315 7 жыл бұрын
Uncaught ReferenceError: ConfirmDelete is not defined at HTMLAnchorElement.onclick i AM GETTING THIS ERROR PLS ANY SOLUTION WHY IT IS ?
@aapkanigam
@aapkanigam 7 жыл бұрын
+Sheshmani Pandey Sam Make sure to create that method in script tag
@samzviews6315
@samzviews6315 7 жыл бұрын
Technotips - Ashish i dint see any method in script tag in your video can u please send me in comment plss i am stucked there
@aapkanigam
@aapkanigam 7 жыл бұрын
+Sheshmani Pandey Sam var ConfirmDelete = function (EmployeeId) { $("#hiddenEmployeeId").val(EmployeeId); $("#myModal").modal('show'); } var DeleteEmployee = function () { $("#loaderDiv").show(); var empId = $("#hiddenEmployeeId").val(); $.ajax({ type: "POST", url: "/Test/DeleteEmployee", data: { EmployeeId: empId }, success: function (result) { $("#loaderDiv").hide(); $("#myModal").modal("hide"); $("#row_" + empId).remove(); } }) }
@kartikeypavar6585
@kartikeypavar6585 5 жыл бұрын
Event_details evnt=db.Event_details.SingleOrDefault(×=>x.IsDeleted==false && x.E_id== E_id); IsDeleted is error pls help me sir
@johanvanwambeke723
@johanvanwambeke723 7 жыл бұрын
Loved it ! shake that boodystrap !
@aapkanigam
@aapkanigam 6 жыл бұрын
+johan Van Wambeke Thanks
Part 17- What is Partial View in ASP.NET MVC | Interview Question
19:25
Technotips Ashish
Рет қаралды 37 М.
Triple kill😹
00:18
GG Animation
Рет қаралды 18 МЛН
They Chose Kindness Over Abuse in Their Team #shorts
00:20
I migliori trucchetti di Fabiosa
Рет қаралды 12 МЛН
Hoodie gets wicked makeover! 😲
00:47
Justin Flom
Рет қаралды 100 МЛН
the balloon deflated while it was flying #tiktok
00:19
Анастасия Тарасова
Рет қаралды 36 МЛН
jQuery Ajax CRUD in ASP.NET Core MVC using Popup Dialog
59:47
CodAffection
Рет қаралды 179 М.
Why aren't you using Fastify? Or Koa? Or NestJS?
9:58
Maximilian Schwarzmüller
Рет қаралды 63 М.
Edit Detail Delete using Modal Popup in ASP.NET CORE
13:23
ASP.NET MVC
Рет қаралды 49 М.
Delete Data In ASP.NET MVC using AJAX and POP UP MODAL
19:09
Code with Salman
Рет қаралды 18 М.
Part 18- How to call a partial View using JQuery in ASP.NET MVC
12:26
Technotips Ashish
Рет қаралды 58 М.
Triple kill😹
00:18
GG Animation
Рет қаралды 18 МЛН