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.
razor
33,306
questions
0
votes
2
answers
39
views
ASP.NET MVC5: Change Upload Limit for Specific URL
I have a partial View page (ManageFile.cshtml) which is being used to upload and download files based on the current page and id. Since this View is partial, I am able to utilize it throughout my ...
0
votes
0
answers
46
views
StateHasChanged not updating UI
i know this is a common problem, but none of the solutions resolved my issue. All explanations seemed logical at first but after implementing them it did absolutely nothing and im kinda at a loss here....
0
votes
0
answers
47
views
Using <select></select> to Show Name + Surname and value = "id"
I tried to show all users with role "Trainer" and choose one of them. But post an id.
select returns null.
<div class="form-group">
<label asp-for="...
0
votes
0
answers
57
views
Edit database interface with blazor
I have created a user interface where users can add or delete values from a sql table. The edit button, running off a separate page, is supposed to display the number selected as a placeholder value ...
-1
votes
1
answer
40
views
@await RenderSectionAsync giving "Cannot await 'method group' "
I am creating a razor application consisting of two simple user inputs and two navigation tabs with 'save' and 'cancel' button for the user inputs.
I have pasted below part of the _Layout.cshtml code ...
0
votes
1
answer
66
views
Passing an IEnumerable<Entity> from view to controller in ASP.NET Core 8 MVC
This is my view:
@model IEnumerable<HourlyLimit>
<html>
<head><title></title></head>
<body>
<form method="post" action="~/...
0
votes
0
answers
66
views
Missing index.html or _Host.cshtml in MudBlazor Project
I'm working on a MudBlazor project and noticed that I'm missing the index.html or _Host.cshtml file. Many solutions suggest adding code to the App.razor file, but my App.razor file looks like an HTML/...
1
vote
0
answers
161
views
How can I implement OIDC authentication for a Blazor Server App in the _host.cshtml file?
I have a Blazor Server app where I want to implement authentication using Keycloak (via OIDC?). I imagine that users will be redirected to the corresponding Keycloak login page as soon as they arrive ...
0
votes
0
answers
15
views
Lag issue using embedded font from https://use.typekit.net/
I created a web app using .net 8
I am embedding font from adobe in _Layout.cshtml using
<link rel="stylesheet "href="https://use.typekit.net/uvj5bpg.css">
when I run the ...
2
votes
1
answer
80
views
Styling issue in Blazor/Razor components when using .razor.css
I'm facing an issue when trying to apply styles to Blazor/Razor components when I move the styles to a separate CSS file. In my project, I define styles in a .razor component, and when applying styles ...
0
votes
2
answers
115
views
Creating a custom component in Blazor Server
I want to create a component that enables users to **autocomplete **from a list of plaintiffs, in addition to allowing them to **create **a new plaintiff if **no results **are found. I know that there ...
0
votes
1
answer
41
views
custom TagHelper is not being rendered [duplicate]
I want to port a very old pdf processing application to .Net and in the process convert handelbars templates to Razor.
I am scratching my head on why a TagHelper is not being picked up.
namespace ...
0
votes
0
answers
41
views
NavigationException thrown while navigating from Static Server Render to Interactvie Server Render Components
I have a scenario where Users can log in directly via URL without Submitting a form on the Static Server Component in the Blazor Server App.
protected override async Task OnInitializedAsync() {
try {...
0
votes
0
answers
54
views
Resolving Color Inconsistencies and Accessibility Issues with Razor Components in .NET 6 Project
I'm conducting research to solve an issue in my .NET 6 project. I'm experiencing some inconsistencies and color problems in Visual Studio regarding a razor library I've added to my main project. ...
0
votes
2
answers
61
views
Razor Component OnClick
I am learning asp and have come across blazor components. I am trying to bind to a buttons on click function, however when I look online I find funcitons that look like:
<button @onclick="...