asp.net-mvc

Formatting text in Html. ActionLink

I have this menu: <ul class="menu"> <li><a href="/"><span class="activ">пункт1</span> ... aw and new HtmlString, but the type doesn't fit Type conversion from " System.Web.IHtmlString "to" string " is not possible

Model for ActionResult is Null

I write tests for controllers on NUnit. The platform .NetFramework 4.7.2. There is a problem that ActionResult does not retur ... by archived return PartialView(model); } Error screen Line 62 - this: Assert.IsInstanceOf>(result.ViewData.Model);

ASP NET.CORE MVC Dynamic Creation

I'm writing a quizzer site. Faced with such a problem. There is a certain survey, with the nth number of questions, you need to click on the button, add a new field for a new question(more tautology, tautology), Example: And we get this result

Starting the ASp. net + web service

I wrote in the studio (MS VS 2012) ASP .net mvc web application and service for it, how to run all this on IIS?

Please explain how Update works in the Entity Framework

I don't understand how to work with Entity Framework. After Laravel and its ORM, it seems to me a completely unfriendly techn ... ticize my code and I will be grateful for useful comments that could simplify the life of readers. Thanks for your attention!

Similar to LIKE (substring search) in LINQ

How do I redo this query to have something like WHERE movie.Title LIKE "searchString" That is, searching for a substring, ... in db.Movie where movie.Title == searchString select movie; return View(MovieQuery); }

C# ASP.NET MVC. How do I redirect a user based on their role?

Probably a banal question. Now I have about 12 pages(one controller for each) and the controllers have the [Authorize(Roles=" ... te and check the roles in each controller by default separately User.IsInRole, but suddenly there is a way to make it easier?

IIS Express does not start again in Visual Studio 2019

In general, there is a website that I run in Visual Studio. The first time everything clearly starts, and if you restart th ... u set the Project URL to the same port as the project that starts repeatedly, then everything is clear... Why can this be so?

No parametric constructors defined

There is an Init method in the parameters there is a third-party developer class userInfo that does not contain an empty cons ... he class @using (Html.BeginForm("Init", "TestControl", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))

An unhandled exception occurred while processing the request. ASP.Net C#

Hello everyone, I decided to start learning ASP.Net, for example, took a project from YouTube, did everything as per the exam ... траничка которая нужна, то будет использоваться URL по умолчанию app.UseMvcWithDefaultRoute(); } } }

Bind certificates to Service Fabric clusters(converting the service to https)

The task is to translate the service to work over https, the service is published through an application of the Service Fabri ... e who faced such a task? How do I create a certificate and bind it to a cluster, or maybe I'm digging in the wrong direction?

Choosing a CMS to integrate into an existing one ASP.NET MVC project [closed]

Closed. It is impossible to give an objective answer to this question . Answers to it are not accepted at the moment. ... s well as add multilingualism to the site. Please help me choose an existing CMS for the solution (the CMS must be on ASP).

Help with markup. Bootstrap 4

Tell me, why in the smallest version of the screen size, the buttons run over the title with such markup and how to fix it? T ... lass="btn btn-primary" value="На главную" /> </div> </div> ... </div> Here's what happens:

Intellisense doesn't work in Rider IDE in. cshtml files (ASP.NET MVC)

I decided to try the rider and was faced with the fact that in the project ASP.NET Intellisense does not work + the highlight ... same time, the same project in the studio works without complaints and everything is fine there. What could be the problem?

How to remove username validation ASP.NET MVC CORE?

I'm trying to change the user's password in this way: await _userManager.ResetPasswordAsync(user, code, editViewModel.Passw ... an only contain letters or digits. (Dmitry is the user name). How do I cancel user name validation when I change my password?

How to make a Linq query with ToDictionary correctly()

There are a couple of requests: string image = product.ProductCharacteristics .Where(c => c.Characteristic.Nam ... ng],System.String])' method, and this method cannot be translated into a store expression. How to build a query correctly?

Bootstrap RadioButton doesn't work

I'm almost new to web programming. I have the following code, where I can not understand what is the reason why RadioButtons ... </div> </div> } </div> </div> </div>

MVC: NLog configuration file

Good afternoon! In the article here it says-install the NLog package, then add an entry to the web config of the project, a ... le and did so, but the logs did not work. Tell me, did I do it right? Or should I have done something different? Thank you

DropDownListFor does not select a value

How do I make DropDownListFor display the value that is in SelectedStatusId? Now the first one is displayed, regardless of th ... the view @Html.DropDownListFor( x => x.SelectedStatusId, (SelectList)ViewBag.Statuses, new { @class = "form-control" } )

Nested lists using CSS

Greetings! Help us understand nested HTML lists. I make a small menu when you hover over an item that drops another menu with ... ;/li> </ul> </li> </ul> </nav> What is the error, How to fix it ? Thanks.