tag-helpers Questions

15

Well, lets get down to it. I'm using Visual Studio 2015 and ASP.NET core tag helpers have completely stopped working, no idea why as I've not changed anything. I was in work one day, they worked fi...
Emoryemote asked 30/12, 2016 at 11:34

5

Solved

Layout has this: <!DOCTYPE html> <html> <head> <environment names="Development">@RenderSection("devCss", required: false)</environment> <environment names="Stagi...
Stridulate asked 27/10, 2016 at 16:25

3

Solved

In Asp.Net MVC we can add class conditionally as following code: <div class="choice @(Model.Active?"active":"")"> </div> How can do this by using tagHelper and by remove else part in...
Nitramine asked 20/2, 2017 at 5:29

6

Solved

I am having issues with .NET core and tag helpers. The color coding and the intellisense are not displaying or being registered when I type in asp-for. I've tried creating a new solution in a separ...
Neodarwinism asked 2/12, 2016 at 3:17

4

Solved

I have an issue with tag helpers. All I want to do is create a form that posts data to the controller - basic enough I thought but it doesnt work in my project. I create a brand new asp.net core ...
Pruitt asked 7/6, 2016 at 6:58

1

I was wondering if .NET core's asp-validation-for has a way to override the class that gets set on a span, or if there is a way to extend the tag helper to allow for that. Right now, when an error ...
Evenson asked 18/12, 2016 at 1:37

4

Solved

I don't see any tag helpers for radio buttons in ASP.NET 5 MVC 6. What's the right way of handling form elements where I need to use radio buttons?
Caernarvonshire asked 2/1, 2016 at 21:26

2

I'm building a webapp with ASP.Net Core, typescript, react and webpack. It's called Ui.WebApp. The React app is located at Ui.WebApp/ClientApp and the webpack build outputs to Ui.WebApp/ClientApp/d...

2

Solved

I am trying to add anything in the query of the request to anchors in the html result: Fictitious example: User makes a request (note that band and song could be anything, I have a route catering...

2

Solved

I'm trying to render a partial view inside a form, I need to use the value of the loop (+1 of course because it starts at 0) as one of the values in my partial, any ideas how I can make this work? ...

1

Tag Helpers are a nice substitute for HTML Helpers in ASP.NET. Code is much easier to read when they're employed. To my knowledge, they're available in ASP.NET Core MVC. Is it possible to use tag h...
Devilish asked 6/12, 2016 at 3:18

7

Solved

I need some help with the select tag helper in ASP.NET Core. I have a list of employees that I'm trying to bind to a select tag helper. My employees are in a List<Employee> EmployeesList and...
Hypothermia asked 6/1, 2016 at 1:6

3

Solved

In Core MVC there is anew concept as Tag helpers. We could previously create custom html helpers to attach some classes based on the validation data annotations such as [Required]. As TagHelpers ar...
Bruis asked 10/12, 2016 at 3:6

4

Solved

I have a lot of experience with ASP.NET MVC 1-5. Now I learn ASP.NET Core MVC and have to pass a parameter to link in page. For example I have the following Action [HttpGet] public ActionResult ...

2

Solved

Is it possible to get the whole view model in tag helper Process method (.NET Core MVC)?
Humpy asked 23/7, 2019 at 13:2

2

Solved

Using ASP.Net Core's Tag Helpers, is there any way to convert 1 tag into 2 tags at the root level? I know you can remove a tag completely using TagHelperOutput.TagName == null, but I'm wondering ho...

4

Solved

When specifying asp-controller and asp-action on a link, what's the syntax for also passing an id attribute? E.g. If I wanted to link to the edit URL for a given object, the required URL would be ...
Bioecology asked 4/5, 2015 at 0:14

2

Solved

I spent the last hour refactoring to use Areas, now all my Views don't seem to have function taghelpers :/ So this is what's in the Index.cshtml <div class="btn-group"> <a asp-controll...
Audiovisual asked 23/9, 2016 at 4:17

8

Solved

I have a simple ASP.NET Core web application with a page like such http://localhost:5050/Posts/Create/3. In my Razor View Views/Posts/Create.cshtml, how would I be able to get the value "3" so tha...
Tiliaceous asked 4/2, 2017 at 23:19

2

My model contains an enum which I'm trying to bind to a list of radio buttons, so that only one value can be selected when the form is submitted. public enum Options { [Display(Name="Option A") ...
Redletter asked 12/11, 2015 at 20:13

2

Solved

I'm using the new Helper tags in ASP.NET MVC 6. <form asp-area="DAS" asp-controller="Report" asp-action="Add" asp-route-id="@Model.id" asp-route-incBalance="@Model.incBalance" asp-route-d...

2

I have asp-route-id working in one instance: It works from an anchor tag like this: <a id="editModal" data-toggle="modal" data-target="#modal_box" class="btn btn-sm btn-primary" asp-action="...
Kibe asked 13/3, 2017 at 18:13

1

I have a simple form like this which makes use of the @Html.EditorFor extension: <form method="post"> @Html.EditorFor(x => x.SystemSettings.EmailFromAddress) <submit-button title="S...
Withdraw asked 5/2, 2020 at 14:53

1

I'm learning Razor Pages Tag Helpers and trying to understand how the partial tag helper works. I notice it can take two different attribute to pass data into a partial: for and model. for: "The f...
Overmaster asked 22/1, 2020 at 16:10

4

Solved

I want to write a Edit.cshtml file for an entity with many properties to edit, so I have to write the following codes many times: <div class="form-group"> <label asp-for="Email" class="c...
Meatball asked 15/12, 2015 at 6:44

© 2022 - 2024 — McMap. All rights reserved.