Questions tagged as 'asp.net-mvc'

2
answers

Use more than one model in View - C # MVC

I have two tables in my database: Celular and Marca . To register a cell phone, I need to select a tag for it, ie two models in a view . How do I get two Models to be accessed in the same view? CellularController public cla...
asked by 10.04.2017 / 04:47
1
answer

Register data via different View

I'm a beginner in asp net mvc and would like to know how I can register data from an entity through different View from the same Controller Thank you !!     
asked by 10.05.2017 / 22:18
1
answer

Convert Html to readable text using MVC C # [duplicate]

I have text in the database like this: Example only: <ul> <li><strong>&nbsp;asdsdasdadsdadsa <em>asdsd asdsdasdasdad</em></strong> <table border="1" cellpadding="1" cellspacing="1" style="wi...
asked by 21.02.2017 / 19:38
1
answer

Pass TempData

Good morning, I have the following problem, I need to pass a variable to another controller and I'm trying to do this for TempData, it follows the code: var user = User.Identity.GetUserId(); var getUser = db.AspNetUsers.FirstOrDefault(x =>...
asked by 20.02.2017 / 20:00
1
answer

What is a good practice for using ModelBinders in MVC

I'm looking to create a page using best practices in ASP.NET MVC. I wondered what would be the best practice for me to model my page using modelbinders to "bind" my object automatically. In this case, my doubt was in the relationships between...
asked by 17.03.2017 / 16:25
1
answer

How to use PNotify within angular

I have the following code and I want to use PNotify to give notifications when the user and / or password is incorrect or / and mandatory field is blank. How do I do? Remembering that I'm using ASP.NET MVC and have already referenced the PNotify...
asked by 16.03.2017 / 19:44
1
answer

How to return output varchar of a procedure in C #?

Error appearing:    An exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll but was not handled in user code       Additional information: Error converting data type varchar to int. public stati...
asked by 20.01.2017 / 21:06
1
answer

call action method in the controller through a view script

I have an action inside my controller, to download an XML file, with the following signature.   public ActionResult Export (int id) {}, I do not understand in my page I have a button that calls a download script in the view, I need this scrip...
asked by 11.01.2017 / 13:49
1
answer

MVC 5 Ajax.ActionLink returns result, but does not render in DOM

Gentlemen, I'm having trouble displaying a list of results in my view. The idea is, when I click on a value from a dropdown, I make an asynchronous query to populate the next dropdown. I would refer to the controller by the Ajax.ActionLink me...
asked by 07.01.2017 / 18:56
1
answer

ERROR Security.SecurityException - HOST Locaweb

Hello, I need help with the error below: My HOST is Locaweb, and I'm trying to run my ASP.NET MVC application but it gives Security.SecurityException error. All the references I found indicate to put <trust level="Full" />...
asked by 19.12.2016 / 11:37