model-view-controller
Why ActionResult method doesn’t take any parameter from Html.BeginForm() inside view?
I tried to make a database named PersonalJobManagement and it includes information of my employees.
I would like to code an ASP.NET MVC website to edit, delete or create new data for this database.
Getting 404 for HttpPost Action
I have a table of records being displayed in a partial view and some of them have no ID values. So I am trying to use an alternative field as an ID when clicking the Edit link for a particular record. I’m not sure if I can legally have two Post action methods, even though I am using different methods names and params.
Binding DropDownList from Database
I’m building a view which will display tabular data based on selections from two dropdownlists, the first which selects departments is populated from the database. The second is a static dropdownlist for “Year” which I haven’t got to yet. There are answers to similar questions, but I’ve looked at them and tried everything. I’ve got to the point where I’m getting a null exception in the view where I created the markup for the dropdownlist.
Calling a Partial View
I’ve got a View rendering two dropdownlists. The controllers for the dropdownlists work fine. They call methods in a repository class for the DB selections. Below the dropdownlists I’m trying to render a table of data in a partial view, in response to the dropdownlist selections.
How to get value from JSON object in c#? If the key is not defined
Below is my JSON information where you can notice that there is not any key defined. {"KOA": {"test.jpg": "xyz.com/images/test.jpg"}} I am Looking the Output like: string _imgName= ms-koa-acazia-ceramic.jpg string _imgUrl= xyz.com/images/test.jpg “KOA” is also a dynamic value it can be changed so I can not fix it. Answers: Thank you for visiting the Q&A section … Read more
How to using ViewBag for Html.TextAreaFor()
HomeController
Posting Back DropDownList from Strongly Typed View
This is related to an earlier question on binding a dropdownlist from a database. The dropdownlist is being bound and populated but is throwing an “Object reference not set to an instance of an object” error in the browser when submitting the form.
Security Trimmed Menu as Partial View
I’m rendering a menu in my _Layout.cshtml file. One section of the menu should only render if the user is in the admin role. We are using custom roles in our DB. The Admin field comes back as a single character, “Y” or “N”. This was originally a legacy application and it’s being migrated to MVC 5. LINQ or Entity Framework is not being used.
How can i use Ajax Jquery and return View?
I have an Ajax Jquery function which sends Values (location and parameters) to an IActionresult which does a search in a Database and returns a new View with the right Objectdata of a Model.
