Skip to main content

Questions tagged [razor]

Razor is a template language used by ASP.NET Web Pages, ASP.NET MVC (since version 3), and ASP.NET Core. It adds a layer of abstraction above HTML generation. It supports seamless transitions between HTML markup and C# or VB code. Transitions between markup and code are indicated by the "@" sign.

Filter by
Sorted by
Tagged with
0 votes
0 answers
36 views

I am using JetBrains Rider 2025.3.2 on macOS with a MudBlazor project targetting .NET 8, C# 12. The project builds and runs correctly, and the same codebase works without any issues in Visual Studio, ...
Swati Chandra's user avatar
2 votes
2 answers
115 views

As mentioned in the subject line why is my Client drop down list in my razor .razor.cs file showing the value instead of the text? As you can see from the image below the Site drop down list is ...
Tim Kruger's user avatar
0 votes
1 answer
131 views

I'm working with Visual Studio 2022 v17.14.23 on my very first Blazor project. I ran into an unexpected behaviour when leaving a TODO comment in a .razor file: as ...
AmicoHuber's user avatar
1 vote
1 answer
40 views

I am generating Blazor components using a custom Roslyn analyzer. The analyzer emits fully compiled Razor components (as C# classes that inherit from ComponentBase ...
ikwillem's user avatar
  • 1,186
Tooling
0 votes
2 replies
73 views

I am currently using lazy.nvim to manage my plugins and csharp-language-server for C# development. While C# files work perfectly,...
David Snoble's user avatar
0 votes
0 answers
76 views

This is possibly a dumb question. I have a .NET 8 web application that is entirely service based; the pages themselves are pure static HTML, and all dynamic content of any kind is loaded via fetch ...
Whelkaholism's user avatar
  • 1,515
Tooling
0 votes
0 replies
39 views

I am setting up an .editorconfig file to enforce certain conventions and code styles. I have noticed that C# style rules only seem to apply to ...
LostSoul's user avatar
  • 431
1 vote
1 answer
97 views

I'm trying to get a form to pass a person's name to a controller, and from there, display that person's LARP character info. Right now I'm only passing the character's name, class, species, and image ...
David Henry's user avatar
1 vote
1 answer
68 views

I'm having an issue when creating a new view in a 2sxc app (version 20.0.8). Whenever 2sxc tries to generate the datamodels / compile the AppCode, the HotBuild process fails. It looks like 2sxc is not ...
Rudhycodes's user avatar
4 votes
0 answers
100 views

Previously, in .NET 9 and lower, we could use RazorRuntimeCompiliation to implement embedded views in assemblies. ...
StarCat-At-CTC's user avatar
1 vote
1 answer
574 views

I've been trying to setup roslyn.nvim with rzls.nvim on my neovim for a while to work with .NET, C# and Blazor. But I've been facing some frustrating problems, I'm using WSL Ubuntu 24.04, a neovim ...
Carlos Saraiva's user avatar
0 votes
1 answer
158 views

There are two pages in my app: Page1.razor (home) and Page2.razor. There is no problem rendering first page. But when I navigate ...
shmowzow's user avatar
0 votes
0 answers
53 views

I have an ASP.NET MVC application, that uses the following package ActionMailer.net This has been going beautifully for many years, but lately we have been hitting issues with the mail servers we have ...
Crudler's user avatar
  • 2,316
-2 votes
1 answer
99 views

I want to use gorazor a viewengine written in go that uses razor-Syntax. They provide an example which i tried to understand and adapt. What is working I want to iterate over a slices of movies and ...
surfmuggle's user avatar
  • 6,054
-3 votes
1 answer
80 views

I get the error, There is no argument given that corresponds to the required parameter 'e' of 'AddContributor.OnPayerIdChangedAsync(ChangeEventArgs)' This is the pertinent area of blazor markup: <...
Michele's user avatar
  • 3,946
1 vote
0 answers
93 views

Summary: I want to create a new scaffold item for Visual Studio in my Razor app so that I do not have to edit every CRUD page to use my custom libraries. I have spent the last 2 days letting ChatGPT ...
Mike_Matthews_II's user avatar
1 vote
0 answers
57 views

I'm working on an ASP.NET Core MVC project in Visual Studio 2022. Lately, I keep seeing these warning messages at the top of the editor: Feature 'Razor Diagnostics Feature' is currently unavailable ...
Anhh Phapp's user avatar
1 vote
1 answer
129 views

Opened a blazor project for the first time in a while and suddenly no code or components are recognized (even on newly created projects): When I hover over components no auto-completion suggestions, ...
zhrgci's user avatar
  • 726
3 votes
4 answers
146 views

I am writing a Blazor component and noticed something unexpected. In my Razor code, I use a foreach to loop over a list, and inside the Click event handler of a RadzenButton I declare another foreach ...
Colin's user avatar
  • 41
0 votes
2 answers
156 views

I'm trying to use a custom 404 component in a Blazor Server app with this router setup: ...
SDG6's user avatar
  • 103
2 votes
2 answers
193 views

(With Visual Studio 17.14.13) Steps to reproduce (sorry this is a bit long but these are the fewest steps I could find): From the command line, create the solution folder: ...
Matthew Watson's user avatar
1 vote
1 answer
144 views

I started a project as .NET Minimal API - no UI whatsoever. Then I needed to add a visual tool for the API, to show what the service is doing. For UI I wanted to use Razor pages and components, as it ...
Sten Petrov's user avatar
  • 11.1k
1 vote
1 answer
52 views

I have a simple project where the start page shows a list of books. How to make the same page, but with display as XML? Controller method: ...
Garp's user avatar
  • 267
1 vote
1 answer
59 views

I have an ASP.NET Core Razor C# app. In the _Layout.cshtml file, I have anchor tags to launch various pages in the form of a menu. Here is an example: ...
OMS Master's user avatar
1 vote
0 answers
36 views

I have following AutoLoginMiddleware in my intranet razor page application and want to modify the middleware to redirect to SessionExpired page purposedly once it times out after 30 min (auth cookie ...
zbx888's user avatar
  • 23
0 votes
3 answers
68 views

I have an ASP.NET Core MVC web application. In _layout.cshtml, I have the following code, but it doesn't drop down in the menu bar it shows "manage" with ...
John Finch's user avatar
0 votes
2 answers
120 views

This is a follow up on Cannot compile a Razor document. I get several errors while compiling a Razor content (not a file). The code is like this: ...
Ricardo Peres's user avatar
0 votes
1 answer
78 views

So I am trying to do what Telerik can do in their code for the Jquery version but it's not working. See below: I am trying to do a pretty simple just list of strings but there are about 80 of them ...
djangojazz's user avatar
  • 13.3k
0 votes
1 answer
65 views

I am trying to compile a Razor document for which I have the contents, not the file. Here are my steps: ...
Ricardo Peres's user avatar
0 votes
2 answers
67 views

I know there are many questions similar to this, but I'm not sure how to implement in my case. In my razor page, I have a @foreach loop that creates several divs ...
fdkgfosfskjdlsjdlkfsf's user avatar
1 vote
0 answers
58 views

I have an app where I want to centralise a notification service. With hardware sending out updates of it current status as it changes. There are a number of separate components which need to react to ...
Matthew Flynn's user avatar
1 vote
0 answers
80 views

I can't figure out why if I assign an empty string in the "if" block, everything works and the string and field are updated.But if I remove the space at the end, also changing the variable, ...
PeacefulWarrior22's user avatar
1 vote
1 answer
212 views

I am using LaTeX for writing a thesis, including the package minted to highlight code. In my case, it is ...
Manuel's user avatar
  • 125
0 votes
0 answers
44 views

The conditional tooltip is not working on kendo UI Grid column. The following code is not applying the condition for title and instead showing the whole text ...
user1263981's user avatar
  • 3,157
1 vote
1 answer
88 views

I'm trying to understand how input validation works. In the HTML below, btnconfirm triggers the validation errors and resetForm ...
fdkgfosfskjdlsjdlkfsf's user avatar
1 vote
1 answer
79 views

Razor components are normally loaded from .razor files. Behind the scenes, they implement the IComponent interface (or one of its implementations). What I'd like to ...
Ricardo Peres's user avatar
0 votes
0 answers
32 views

The cshtml for my modal dialog has two input forms. When I click on "Submit" the required attributes for the input forms are working since the ajax call is not invoked unless both inputs ...
fdkgfosfskjdlsjdlkfsf's user avatar
1 vote
2 answers
198 views

This has been a slow step-by-step process for me, but I'm getting there. My modal popup has two input forms that need to be filled out before the ajax call is executed. I've tried a few options, ...
fdkgfosfskjdlsjdlkfsf's user avatar
2 votes
1 answer
78 views

I'm learning how to call C# code from a razor page with AJAX, so please bear with me. In the html, I create a container of divs based on a foreach loop. The divs ...
fdkgfosfskjdlsjdlkfsf's user avatar
0 votes
2 answers
60 views

I've been searching for a way to increase the width of the modal popup in my cshtml, but haven't been able to. I tried the suggestions in this SO question, but none worked. Here's my code. Doesn't ...
fdkgfosfskjdlsjdlkfsf's user avatar
0 votes
1 answer
50 views

So I've been learning asp.net core and razor, and it's been awesome. I finally created the div structure bound to my sql data, and that was pretty cool. My next step is to display a modal popup when I ...
fdkgfosfskjdlsjdlkfsf's user avatar
0 votes
5 answers
114 views

I'm learning how to use razor, so please bear with me. I'm trying to create a simple grid that shows our products. Each row will display several products, and each product will display the name, the ...
fdkgfosfskjdlsjdlkfsf's user avatar
0 votes
0 answers
52 views

I have the razor page (with MudBlazor) with a MudTable at the top. The table displays . Beneath that, I have a grid of MudDropZones, rooms as columns and roles as rows. I called it . So a person has a ...
Spufi's user avatar
  • 21
0 votes
0 answers
34 views

I have a WebApi and Razor frontend project (both using .Net 8.0). I'm trying to learn to implement authentication using JWT and cookies. As of now it is working well: Login on my razor website, which ...
Baldwin Salcedo's user avatar
0 votes
1 answer
84 views

I have a datatable in Razor Project with rows containing id, name, title, parent, and other fields. I need to bind a JavaScript array dynamically, but I tried this code and got an error. Please help. ...
test testb's user avatar
0 votes
0 answers
56 views

I am working with jQuery datatables, but the datatable is always empty when the page loads. On inspecting the network tab, the request returns an empty response but when debugging the controller ...
Adam Lukman's user avatar
1 vote
1 answer
130 views

I want to create a test website for recording a company's information. After running the software and entering three data entries, everything goes well. However, after registering the fourth data ...
Abozar Nazari Zohan's user avatar
0 votes
0 answers
32 views

I'm working on an ASP.NET clean architecture project that uses Azure Functions to send emails. The email templates are stored in Services/EmailService/Template/ with each template using @model to bind ...
2gblue's user avatar
  • 1
0 votes
0 answers
45 views

I'd like to customize the way Visual Studio auto formats Blazor/Razor components. Usually, it formats wrapped tags like this: ...
Cesar's user avatar
  • 655
0 votes
1 answer
74 views

I'm trying to generate HTML to a string from a Razor component. I use the following code to do that: ...
Erik Z's user avatar
  • 4,822

1
2 3 4 5
666