Questions tagged as 'asp.net-mvc'

1
answer

Show the path of a file, before uploading it to a server

I have this code which assigns my file name to upload to my server, this is to register it. string rutaPDF = Request.MapPath("PDFs_Landing/"); Random ra = new Random(); int numeroP = r.Next(5, 10000000); tituloLanzamiento = tituloLanzamient...
asked by 29.05.2017 / 17:11
1
answer

Error inserting into the BD using EF

I have this model generated by EF public partial class Ventas { public Ventas() { this.Caja = new HashSet<Caja>(); this.VentasLinias = new HashSet<VentasLinias>(); } public string weblogin { get; s...
asked by 27.05.2017 / 17:51
0
answers

Error when including a webform file in a view for MVC C #

Along with saying hello, I wanted to ask for your great help: It turns out that I want to incorporate in a view, a partial one that is a webform: I have a view called See: public ActionResult Ver(){ return View(); } in the cshtml I call...
asked by 18.05.2017 / 07:39
1
answer

MVC Razor: How can I initialize DependencyResolver.Current.GetServiceEntity?

I comment quickly: for the architecture of the system there is an "easy" way to get to the database to make update and delete, which is through DependencyResolver . Copy code so you have an idea: IEntityService<Persona> servicePersona =...
asked by 15.05.2017 / 17:32
1
answer

asp net mvc5 - resource file for web multi language

I am trying to make my multilanguage project for it I have created the asp net folder "App_LocalResources" and I have added a resource file that is named "clientes.es-ES.resx" Then in the properties I left them as the capture Now I g...
asked by 17.05.2017 / 10:53
1
answer

IndexOutOfRangeException

The error marks me when it enters the Reader of my while and causes "who" using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Data; using System.Data.OleDb; namespace tts { public class conexi...
asked by 03.05.2017 / 14:17
3
answers

Error loading form data

I'm making a form that loads data and shows it in a view with MVC. Customer.cs using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace Formulario2.Models { public class Customer {...
asked by 21.04.2017 / 21:36
0
answers

problems loading partial views strongly typed with ajax

I have the following code that at jquery, try to bring the data from a partial view and show them in the main view. the issue is that when you start the process, and click on the corresponding button, the load event, does not load anything, ther...
asked by 04.04.2017 / 20:54
1
answer

Send data to the controller

I defined a default value in a form that I have in a view (@ Value="afar1793") and I set it disabled so that it could not be modified but when it gets to the controller it becomes null. I have this in my code: View: <div class="form-g...
asked by 27.03.2017 / 01:33
1
answer

Dynamic Divs from the data of a model

I need to create a view with razor, that with data of a model, I generate different DIVs dynamically giving them an ID to each of them, that allows me to identify them when the user selects them using javascript. I have a model that has a lis...
asked by 23.03.2017 / 15:20