Questions tagged as 'asp.net-mvc'

1
answer

How to call ActionResult from another area with an html link?

Hello, I have a link in a View and I need to direct this link to a ActionResult that stays in another Area of my project. It is a link of Sair to call the ActionResult Logoff .     
asked by 12.02.2014 / 18:42
1
answer

How to pass a parameter along with the Model to a PartialVIew when rendering it

To create some fields dynamically, I'm using a for and rendering. When calling Partial _Contact, I would like to pass the value [i] of the index of for so I can sort the fields. It's not working ... You're giving the page error ... does anyone k...
asked by 23.10.2018 / 23:52
1
answer

Save Path of the image in the bank and call in the View Asp.Net MVC

I'm trying to save the image path in the database, and then calling the view, however, is saving the entire physical path. and at the time of calling, the image does not appear. My Controller: public ActionResult Create(IEnumerable<Http...
asked by 26.10.2018 / 01:06
2
answers

Radio button or button to sort data

In my project, I have an Occurrences table and a column called Status and Status values are either pending or resolved. I need to sort the data and create a logic that in my view I have a button, or two, and clicking shows all occurrences tha...
asked by 18.12.2014 / 19:01
1
answer

Json with problem, does not continue execution after request

Contortor code public JsonResult InsertComment(string description, int postID) { try { Comment comment = new Comment { Content = description, DataCommented = DateTime.Now, PostID = po...
asked by 16.06.2014 / 21:24
2
answers

Limit query in index but not in combo

Good afternoon, In the company's ERP we have a query in the Index that is limited to 80 records. The problem is that in create we have combos that bring more than 150 records and also limiting to 80 records. How can I do to just leave in i...
asked by 05.10.2018 / 18:02
1
answer

POST requests AJAX ASP net MVC

Good afternoon, I'm having a little doubt, I'm doing a POST request with AJAX in ASP net MVC and everything works fine, but in firefox I get an error in the console However,inchromethiserrordoesnotappear.Hereistherequisitioncode:functionadicion...
asked by 09.10.2018 / 21:18
1
answer

Output ASP .NET MVC Cache

I am studying about the output cache in Asp .NET MVC to improve the performance of my application. From what I've seen it can be stored in various places like: · Any · Client · Downstream · Server · None · ServerAndClient Doubt If I ca...
asked by 13.11.2018 / 10:22
1
answer

Pass controller error to the view

I am making a basic login form and find myself in the following situation: I want to return an error if the user does not exist in the database and I am doing this using "ModelState.AddModelError". However, when I log in I go back to the f...
asked by 18.09.2018 / 16:53
1
answer

How to redirect the user to a specified page after login

I am able to login by user type: admin or common. And I'm using:    [Authorize (Roles="Administrator")] and   [Authorize (Roles="Common")] Within the Controllers I want to restrict by type of user that can access it. But I would like to m...
asked by 21.10.2018 / 02:22