Questions tagged as 'asp.net-mvc'

1
answer

Object can not be converted to dbnull in other types

Good evening, gentlemen. I am doing a user registration in college work and at logar this error appears. How can I resolve? privateUsuarioMapear(DataRowregistro){varusuario=newUsuario();usuario.Nome=Convert.ToString(registro["NOME"]);...
asked by 24.10.2018 / 17:58
1
answer

I can not get the view parameter in the controller

Remembering that while running it does not return any error Controller using CRUD.Aplicação; using DocumentoObjeto.dominio; using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; namespa...
asked by 21.10.2018 / 21:47
1
answer

Razor MVC - When using @using (Html.BeginForm ()) fields do not stand in front of each other

I'm starting to study MVC + Razor and in basic CRUD example, I'm trying to put the fields in two columns, as if they were using in HTML. But my code only works if I remove the @using (Html.BeginForm()) . Using @using (Html.BeginForm(...
asked by 09.09.2018 / 16:46
1
answer

How to enable CORS for web page access from a different domain in Asp.Net MVC

I'm developing an application that is communicating with Secure Paging Checkout through the Web Server link that is working perfectly, after making the payment PagSeguro provides the possibility to indicate a page in my application to receive...
asked by 15.10.2018 / 14:40
1
answer

How to send two integer parameters to an Asp.net MVC Controller using Ajax

I have a composite key table (PersonId and ProfissaoId). The PersonId property is in a hidden and ProfissaoId gets accumulated in a data-id. Stays two information must be passed to the controler so I can delete the record. Currently, I have this...
asked by 21.09.2018 / 23:28
1
answer

Modal opening under another mode

I have two manners, one I call within the other, but it's getting below. Here's how I'm doing: First I open this: <div class="modal fade" id="myModalAdd"> <div class="modal-dialog"> <!-- Modal content-->...
asked by 20.08.2018 / 13:52
1
answer

Improve routes

People have some better way to do these routes? Or for every action in my Controller, will I have to create your routing? app.UseMvc(routes => { routes.MapRoute( "Login", "Login",...
asked by 19.09.2018 / 19:44
1
answer

How to add includes by expression in repository pattern C #

I'm creating a RepositoryBase (Repository Pattern) with EntityFramework Asp.Net Core, and in it I'm creating a Where method, where I pass an entity where expression. So far the method works perfectly, but in this same method I would like to pass...
asked by 13.08.2018 / 19:41
1
answer

Questions to resize with ASP.Net application

I'm developing a web report (ASP.NET + BOOTSTRAP) and opening it on my mobile phone looks like this: Wouldyouliketoresizetheselinestotheendortakeoutthesidelines,wouldthatbepossible?Thecodelookslikethis:@modelPagedList.IPagedList<Relatorio...
asked by 13.08.2018 / 21:30
1
answer

Call by menu does not enter Action

I have this menu in _Layout.cshtml @if (Response.Cookies["UserSession"]["UserRole"] == "Rh" || Response.Cookies["UserSession"]["UserRole"] == "Admin") { <li>...
asked by 16.09.2018 / 16:01