Questions tagged as 'asp.net-mvc'

0
answers

How do I send a rest object for a soap asmx?

I have this controller [Route("api/[controller]")] public class OptOutClientController : Controller { HttpClient client = new HttpClient(); private readonly IOptOutService _service; public OptOutClientController(IOptOutService service...
asked by 25.06.2018 / 18:49
1
answer

Can a javascript function be executed from a Controller with an ActionResult?

I do not know if I can but I need to execute a javascript instruction that returns a value to me. But I need to do it from an ActionResult of a controller in ASP.NET MVC Clarification: I already know that it is a client code in the server cod...
asked by 23.06.2018 / 02:31
1
answer

Error System.Web.HttpException when doing a Response.Redirect

I have an action filter that validates me if there is a data or this is true or false to then redirect to an external url. Redirection works well. But I have the filter in my controller globally and when I enter the controller...
asked by 26.06.2018 / 15:41
1
answer

How to display an EditorFor based on a selected item from a DropDownList in MVC 5?

Greetings I have the following situation. I have the following code in a view <div class="form-group"> @Html.LabelFor(model => model.IdDestinoPersona, htmlAttributes: new { @class = "control-label col-md-2" }) <div class...
asked by 09.07.2018 / 18:52
0
answers

Consume SOAP with another REST service (Asp.Net Core 2.0)

This is my first post in Stack Español (SoEsp) This is my interface and classes of my soap service Interface [ServiceContract] public interface IOptOutService { [OperationContract] [WebInvoke] void PostOptOut(OptOutEntity client...
asked by 22.06.2018 / 15:31
0
answers

Can you customize the error message of a property of type int?

I have the following model public class UpdateViewModel { [DataType(DataType.PhoneNumber, ErrorMessage = "El campo teléfono particular debe ser un número")] [Required(ErrorMessage = "El campo teléfono particular es obligatorio")] [...
asked by 25.06.2018 / 17:06
1
answer

Pass a list from the action in my view in MVC 5

I have the following query in the Action Then in my Vista I try to show the table in the following way using @ item.cantRevised I would also like to know if in MVC 5 you can pass a list in this case consult with LINQ through t...
asked by 16.06.2018 / 20:44
0
answers

model ApplicationUser does not appear in the 'Model class' list

When I try to create a new controller using a 'Controller with view and using Entity Framework' this particular model does not appear inside, which makes me wonder: why would not a class appear in this list? Please help me with this My dat...
asked by 22.06.2018 / 02:15
1
answer

fill ComboBox with enum c # in MVC

I am using MVC with C #, I have a problem as I can fill a ComboBox with @ Html.DropDownList () using an enumeration from my controller, knowing that in my ComboBox it should be placed as value (number in the enumeration) and the text (name of...
asked by 15.06.2018 / 00:37
1
answer

Why do you create a cookie with name ASP.NET_SessionId?

I have a project in ASP.NET MVC 5 in which when reviewing the cookies of my application there is one that is called ASP.NET_SessionId , which does not stop what it is and why it is created. Does anyone know anything about this...
asked by 14.06.2018 / 00:02