Questions tagged as 'asp.net-mvc'

2
answers

Make JOIN with 2 classes [closed]

How to make a JOIN for the Customer Code to appear in the Name?     
asked by 26.09.2015 / 01:45
3
answers

How to put two actions with HTTPPOST

How to put two controllers with HTTPPOST [HttpPost] public ActionResult Index(string Nomel, string Utilizador, string Password, string PasswordC) { } [HttpPost] public ActionResult Index(string Nome, string Email, string Message) { }...
asked by 09.03.2018 / 12:55
1
answer

How to create a shopping cart in ASP.NET MVC [closed]

Good evening! I'm doing an ASP.NET MVC project and I really need to create a shopping cart to get all the items the user clicks on add to cart, for example the product will be on the index page, the user clicks add to cart and the data with prod...
asked by 04.08.2017 / 01:01
1
answer

Api to delete is not working, does not delete. A Stored Procedure on the bank is working

This is the API public class DeleteCidade { BancoContext banco = new BancoContext(); public void deleteCidade(int id) { banco.Database.SqlQuery<Cidade>("exec sp_del_cidade", new SqlParameter("@id"...
asked by 08.08.2018 / 21:43
1
answer

Changing the select in SP gives error [closed]

This is the error: System.Data.Entity.Core.EntityCommandExecutionException: 'The data reader is incompatible with the specified 'TreinamentoCrudApi.Context.Cidade'. A member of the type, 'id', does not have a corresponding column in the data r...
asked by 10.08.2018 / 14:59
1
answer

Return from Json [closed]

I do not understand the JSON operation, but here I have a Controller code that returns a JSON and I want to know how to display this data on the screen. public ActionResult ShowPlaylists() { if (string.IsNullOrEmpty(Session["token"].ToStri...
asked by 01.11.2016 / 04:12
0
answers

HTML and CSS form with Asp.Net MVC

I have this login form done in CSS and HTML, can I use it in ASP.NET for authentication? The only change I thought of doing was for form within: @using (Html.BeginForm("Login", "Conta", new { ReturnUrl = ViewBag.ReturnUrl }, FormMethod....
asked by 15.12.2018 / 16:50
1
answer

Convert DateTime to Date [duplicate]

I need to compare a date without the time, only ("dd/MM/yyyy") with the database with Linq , but I am not able to transform from DateTime("dd/MM/yyyy HH:mm:s") to Date("dd/MM/yyyy") format?     
asked by 24.10.2018 / 21:09
1
answer

How to cached in C # .NET an information for multiple users?

I have a list of objects, and I would like every user who accessed a page to add their objects to the cache. And that this cache was worth to the next person who accessed the same url. Example, I have the url "/ objects / id-6", the first use...
asked by 30.11.2017 / 21:22
1
answer

The ViewData item that has the key 'officeId' is of type 'System.String' but must be of type 'IEnumerableSelectListItem'

   Controller: public ActionResult Cadastrar() { ViewBag.officelist = new SelectList(new OfficeREP().ListarTodos(), "id", "estado" ); [HttpPost] [ValidateAntiForgeryToken] public ActionResul...
asked by 03.02.2016 / 18:10