Questions tagged as 'asp.net-mvc'

1
answer

Nest tag ul in another tag ul with foreach

I have this foreach, which I did with your help here at SOPT. I made it work, but it worked. Only I did it with just one knot. What I'm going to need is this. I have a parent node, inside that parent node a child, inside the child a grandson and...
asked by 16.09.2014 / 15:29
2
answers

Select folder in directory in the input

I need to put a input where the user selects the folder that he wants that he wants to save the notes, but only select. I tried to do it this way: <input asp-for="Caminho" class="form-control" type="file" multiple webkitdirectory...
asked by 20.12.2018 / 20:22
1
answer

How to pass parameters to the _Layout.cshtml view in Asp.Net projects

Hello, seeing that I have a% control panel%, my layout basically changes only the center with the Area , however I want it for features in the views part, and for those functions I need access the object of the person logged in. How...
asked by 17.05.2014 / 18:52
1
answer

How to get RadioButtonFor value through FormCollection and save in BD SQL Server

I have a model with several booleans, I need to get their values through a FormCollection and save them to the SQL database (it does not accept boolean, so the field is a bit). My View: <div class="editor-field"> @Html.Rad...
asked by 16.05.2014 / 21:36
1
answer

url in MVC project of an .html

I would like to create a .html that will serve to be the _Layout.cshtml menu, I will call it through $("#IDMenu").load('menu_Home.html'); My question, what better place to leave it? I can leave it in the folder /Shared/ ? _Layout.csh...
asked by 13.05.2014 / 20:33
1
answer

Skip list for model

I have a query that returns a list like this: var list = db.Comentario.Where(d => d.GrupoTrabalhoId == Id).OrderByDescending(s => s.DataComentario).ToList(); After this query, it will return me among other things the user id, I would...
asked by 04.12.2018 / 19:27
1
answer

Update User Role ASP.NET Identity

Hello everyone, I'm finding it difficult to update the user role when updating my data, my roles are being filled through a ViewBag in my get from my controller and I'm retrieving the new ID in the post from my controller through the request. fo...
asked by 14.12.2018 / 21:53
1
answer

How to execute a method at the initialization of ALL Controllers?

I have a static class that loads the language against the cookie stored or the URL. In every controller I have to insert the following method once: protected override void Initialize(System.Web.Routing.RequestContext requestContext) {...
asked by 28.11.2018 / 13:07
1
answer

Sending form with Asp net mvc5

Hello, I have a form to send where the button is outside the form, this form has 50 different fields, I made in html and I need to receive this data via post in a C # controller, however I have no idea how to receive these Can someone give me a...
asked by 28.11.2018 / 12:30
3
answers

Log reading to infer counter

I have a template called Request and this template has a column called Number. This Number has the following structure: YEAR + COUNTER. It happens that whenever I'm going to create a new request I get the last request added in the data...
asked by 06.02.2014 / 19:01