Questions tagged as 'mvc'

1
answer

Fill a DropDownList depending on a conditional query in asp.net mvc 5 entity framework

Hi, I have to fill out a dropdownlist with the information that this query gives me. Select Unit from Unit Measures where Status = 'Active' This query should bring me the units that have the active state but I do not know how to implement...
asked by 27.12.2018 / 19:35
0
answers

Error executing but not debugging

When I do Debug it works for me, but when I do it, the modify action does not work for me. This is the driver code: using System; using System.Collections.Generic; using System.Configuration; using System.Data; using System.Data.Entity; usi...
asked by 20.12.2018 / 20:05
4
answers

Redirect to a page with its corresponding id

Implement this code so that it works as it should be, when pressing the button, direct me to an entry corresponding to that id. My idea was this but it is clear that it is wrong. <button class="btn btn-xs btn-default" title="Editar"...
asked by 13.11.2018 / 17:38
2
answers

How to change the class of depending on its value in C # MVC

I have this form that gives me two data "active and deactivated, how to make them change depending on, with the class class"label label-success y label-danger' <tbody> @foreach (var item in Model) { <tr>...
asked by 27.09.2018 / 18:28
1
answer

Cast error int ActionResult

I'm using VS 2017 for a tutorial but I get the error: You can not implicitly convert the long type to System.Web.MVC.ActionResult How do you fix that? The controller public class DefaultController : Controller { private TablaDato ta...
asked by 08.09.2018 / 05:31
1
answer

Error generating linq data list

Launches the following error:    The entity or complex type 'SisVentaOnlinne.Models.Card' can not be constructed in LINQ to Entities query. This is the method that the list with the data generates: public List<Card> GetCard()...
asked by 24.04.2018 / 14:08
1
answer

Convert Calendar to Date to store it in SQLite database

I need to convert a CALENDAR variable to DATE (to get date and time), so after that that DATE variable is saved in an SQLite table that has a DATETIME type. Clarified this we begin by showing the SQLite table called "file", which I plan conta...
asked by 24.08.2018 / 18:01
0
answers

Why do not all the variables pass through the GET method in C #?

I have the following driver to receive parameters by get I send my url as link public ActionResult UsarCode(string rmail, string rcompany, string raddress, string rpais, string rtel, string rhash, string ridpalpay, string rpriority, strin...
asked by 14.08.2018 / 18:12
4
answers

Save a txt in my solution

Hello, I hope you can help me. I have this code using(StreamWriter escritor = new StreamWriter(@"C:\Prueba.txt")) { escritor.WriteLine("Hola"); } The problem is that when I upload it to my host it does not save the file by the route...
asked by 03.08.2018 / 17:56
0
answers

Submission of Form and Data from Table to ASP .NET Controller by AJAX

This is my first question on this platform. I am new with the ASP .NET framework and I have a problem that I tell you: I have a table that is generated as products are added to it to be billed. I also have a form with the data of the invoice....
asked by 05.09.2018 / 16:08