This is blog by the developer and for the developer.I am creating this blog for help the people to learn from basic to advance level concepts in technology world.
Test Post from Sagar Jaybhay
Get link
Facebook
X
Pinterest
Email
Other Apps
Test Post from Sagar Jaybhay https://sagarjaybhay.net
In this article we will understand How to delete data using Post request in Asp.Net MVC? and How to add Confirmation alert box on button click in Asp.Net MVC by Sagar Jaybhay . Always remember if you want to delete data from the database use Post request. Never use Get request for deleting resources on a database. Because if you have to get a call to delete data from the database and any hacker or some malicious user got your Get URL then he can delete your data. Also, google try to index your page as an SEO point view so if you issue get request then it’s not good practice to delete data using Get so always use Post request to delete data. In our application see below image we use action link to delete Employee from a database but this will issue a get request to avoid this we need to use the button for post-call and this we need to use Form control in our application so we rap our application inside form and issues a Post call for delete. To create button control here code is ...
In this article we will understand model binding updateModel tryupdateModel -mvc ASP.NET MVC By Sagar Jaybhay . But for this you need to read previous article where we start CRUD Operation in MVC . Model Binding [HttpPost] public ActionResult Create(string EmpName, string EmpSalary, string gender, string EmpEmail, string EmpCity, int departmentid ) var employee = new Employee() EmpName= EmpName, EmpSalary=Convert.ToDouble(EmpSalary), EmpCity= EmpCity, EmpEmail= EmpEmail, EmpGender=gender, DepartmentID=departmentid ; new BusinessLogic.Business().CreateEmployee(employee); return RedirectToAction("DisplayCompleteEmployee"); In this above method, we use the method parameter and when we click on Create button this method is called. Also, we can use FormCollection in this which required the key to access data and we get this key from formcollectionobject.allkeys get all keys. But how the form textboxes are bind correct data to parameters in that method is by using...
In this blog series we will learn Angular 9 and this my first blog on Angular 9 . So we start with what are Prerequisite of Angular 9 By Sagar Jaybhay . Node It is a javascript runtime. If you want to run javascript you need to run this inside the browser but by using Node you can run javascript outside the browser. To download node use this link https://nodejs.org/en/ The current version is 12.16.1 LTS to download this use this link:- https://nodejs.org/dist/v12.16.1/node-v12.16.1-x64.msi To build node they use Chrome’s V8 JavaScript engine. And the Chrome engine is one of the best engines for JavaScript. It is a fully programming platform and in NODE we have Http component, file component, URL component and NPM for angular. If we want to learn Angular 9 we required only NPM( Node Package Manager Commands). How does the Node Package Manager work? In the software industry, there are lots of package managers present like maven, nugget and currently npm. A package manager is a sof...
Comments
Post a Comment