Questions tagged as 'asp.net-mvc'

3
answers

How to run Url.Content via Client?

In ASP.NET MVC, you can run @Url.Content on views and controllers. This variable returns the relative level the site is in. My question is: how to run Url.Content via JavaScript? Is there any way in MVC? EDITED Example o...
asked by 07.02.2014 / 02:33
2
answers

Generate model-based migration (Entity Framework)

I'm trying to generate a migration based on a model: [Key] public int Id { get; set; } [MaxLength(100)] public string NomeInstituicao_Fundamental { get; set; } public string AnoInicio_Fundamental { get; set; } public stri...
asked by 25.09.2018 / 20:18
2
answers

LogOff with bank registration and cookie deletion behind Session_End () in Global.asax

I'm needing help with a project I've been breaking my head for two days. I am using Microsoft C # MVC5 technology and framework 4.5, I also use Entity Framework 6 with Repository Pattern, Unit of Work, and Unity to perform the dependency injecti...
asked by 09.10.2014 / 22:20
2
answers

Change a detachable PDF field

I'm working on MVC 4 and I've installed iTextSharp to create PDF's, so far so good. But what I'm doing is replicating a PDF that already exists, to fill in the required fields in this my created PDF. Doubt now appears: The PDF I am rep...
asked by 27.02.2014 / 12:17
3
answers

How to save selected items on check coming from bank using AJAX, JQuery and C # MVC?

I have a form that shows me a list coming from the bank in checkbox form. How can I identify which items in the list have been marked in the save? I carry it like this: function CarregaSaida() { $.ajax({ url: "/Qualidade/Entidade/C...
asked by 07.06.2018 / 16:05
1
answer

POST model arriving null in controller

I have a complicated problem in my code that I can not solve. Initially, I have a function SubmitUsuarioRegistro of JavaScript that performs the post of the user profile, forwarding the information to controller . This code was...
asked by 11.06.2018 / 04:43
1
answer

How to change the color of a div via javascript with one condition

I'm trying to change the color of a div if the following condition is true, if( @ViewBag == "reservado" ) , but I can not, could someone tell me what the code would look like with that condition described above? I'm programming in...
asked by 05.10.2018 / 18:34
1
answer

Authentication and permission of Users with MVC

I'm developing an application in MVC 3, using C # for Models and Controllers and Razor with HTML for Views. I want to implement authentication and permission from users to the system. How can I do this using the features that MVC provides for us...
asked by 12.02.2014 / 02:11
2
answers

Get folder of solution C #

I have a solution with 4 projects inside. In my controller I need to open an HTML that is inside another project, but I can not open the file folder. Below is the following with my structure: TheclassfileistheUtils.cscontrolleriswithin1-S...
asked by 28.05.2018 / 14:46
1
answer

How do I pass the value of the Tumb variable to my controler?

How do I pass the value of the Thumb variable to my control? The two input fields then passing normally, however the tumb variable has to pass the Image Url of the video. Controller [HttpPost] [ValidateAntiForgeryToken] public ActionR...
asked by 19.09.2018 / 21:06