razor

Horizontal list in RazorPages

You need to create a horizontal list. There is a style <style> ul.hr { margin: 0; /* Обнуляем значение отст ... строчка строчка строчка строчка строчка строчка строчка строчка строчка строчка строчка

Razor Pages adding and assigning roles

I'm trying to figure out how to add roles and assign them to users in Razor Pages 2.1. I need to create an administrator role ... tunately, this approach in Razor Pages did not work for me. Tell me how you can create and assign roles in Razor Pages 2.1.

Problem running Method to insert new user using ASP.NET MVC with HTML and RAZOR

I am having a problem when executing a request to insert a new user, I do not know what I need to do now to finish my request ... : Usuario [HttpDelete] public ActionResult Delete(int id) { Repo.Deletar(id); return View("Index", Repo.Listar()); }

How to make a logged in user helper Asp.NET MVC 4?

I need to implement a logged-in user Helper, i.e. a static class that returns information about the logged-in user of context. The idea is to use the information in both Controllers and Views.

Persist information using ViewBag?

I have my screen login is I want to show the name is user id logged on another screen, so I can use this information. In my ... : @TempData["id"]</div> <div class="panel-heading">Nome: @TempData["nome"] </div> </div>

Input type = "password" with the eye of Show Password

I need to put a <input type="password"> with that eye of revealing password, but it has to work as follows: User clicks on the eye and when dropping hides the characters again. Follows an example Photo:

How to retrieve logged in username and display in View

I'm trying to develop a page, where I put the user login, it is redirected to an index, where I would like to display the use ... del OneeWeb.Models.ApplicationUser @{ ViewBag.Title = "Index"; } this is the model responsible for having user data?

How to put an @ inside {} in MVC

When making a page in MVC5 with Razor, I put the following code {--conteúdo da @ RenderBody() etc, etc } Generated an ... .0.30319; ASP.NET Version:4.0.30319.34009 How to place the arroba inside? and if I want to write @RenderBody() has no how?

What is an Engine?

I read an article about Razor. This article says that it is a engine view , but what is a engine? According to the article Razor is a new syntax that works with CSS and HTML to make life easier for programmers with a cleaner and more readable code.

Form ASP.NET MVC 5 cannot access model properties

I'm starting on ASP.NET MVC, following tutorials and handouts on the internet I created a study project and I am having some ... the entity-framework. I even tried to create a Migration and give update-Database, but it did not have an effect on the bank.

Error trying to render a partial view in a view

I have a View (cshtml) and in it I need to call a partialView. This Partial is a table with the logs of that sale, which will ... o too <p>@Html.Partial("_LogAlterarMarkup", Model.OrderId)</p> OBS : the partial view is another Model (Log)

Partial is not rendered

According this link from another question of mine that ended up generating error where I followed the steps related to anoth ... model.Numero) @Html.EnumDropDownListFor(model => model.TipoTelefone) } Note: I'm using the BeginCollectionItem package.

Select Multiple with jQuery Chosen

I have a Class client , and a class system My client can have more than one system, and one system, can have more than on ... t minus a tutorial, article, anything, in which contain an explanation for how I can do this, would already be of great help!

How to insert values that have", " as a decimal separator?

Hello, I am doing a product registration using .NET Core 3.1 and I am having the following problem: In the product registrati ... ="Preco" class="form-control"/> <span asp-validation-for="Preco" class="text-danger"></span> </div>

how is it possible after the user is removed from the system by inactivity, the same return to the same screen that was after login [closed]

closed. this question is out of scope and is not currently accepting answers. ... ime to the home page, but I would like to make this dynamic, so he returns to the last page before his session is taken down.

Write TimeSpan in full

I want to write a static class (can be Extension ) to represent the value of a structure TimeSpan by extenso, in Portuguese. ... month ago. 3 Months, 2 weeks and 4 days ago. A year ago. 2 years and 7 months ago. How could this be done in an elegant way?