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,315
questions
0
votes
1
answer
63
views
Text input into List in cshtml
How can I turn a text input separated by comma in html into a list of a model that I created and add the values into a sql-table
Models
public class Person
{
[Key]
public string PersonId { get;...
-1
votes
0
answers
20
views
2sxc get string resource from another language
In lastest 2sxc, In razor template, how can I get resources from a specified language? For example: The current website is still in en-US language, but I want to get the value of a label of another ...
0
votes
1
answer
74
views
CSS for bootstrap accordion
So I'm pretty new to css and bootstrap, and have added an accordian into my view page. I have tried to alter the original css but with no luck!
<div class="accordion accordian-flush" id=&...
0
votes
1
answer
33
views
[Blazor Razor pages I am working on the login/register of a website and these error codes popped up: CS0120 and CS0117
I am creating a website/blog with a register/login/logout feature. I am almost done, but having a hard time with the Identities on the .Net8. The scaffolding feature changed and there were no YT ...
0
votes
0
answers
16
views
Footable: How to render same hidden columns multiple times within a single row
I am using row expand feature of footable to show hidden columns within a row (on click).
What I have/Issue:
I have same column description which is repeating 4 times (as it has 4 services associated ...
0
votes
0
answers
33
views
How to autopopulate fields from razor view page
I have already created a view that displays data in a razor page (5 columns)
studentFirstName, StudentLastName, StudentId, CourseId, Grade
It also displays a button (instead of default Edit link) ...
0
votes
0
answers
28
views
How to display text input box over modal in abp framework?
I have the following code which is a modal element. The "NewButton" element is supposed to trigger a text input box in which the user writes the reason for the delete action. The Scripts ...
0
votes
0
answers
23
views
Submitting a form from a website to an external Kali Linux server to run a python script
As part of my school project, I am trying to create an automated vulnerability tester website which takes in a user input as URL and this URL will be submitted over to a kali back end, which will run ...
-1
votes
0
answers
19
views
Unable to render FusionTime charts in Blazor
I have built a Blazor app that renders FusionCharts, connecting to a SQL Server database. I have successfully created regular FusionCharts and linked them to the SQL Server database. Additionally, I ...
1
vote
1
answer
63
views
ASP.NET Core MVC web app : antiforgery tokens
I am wondering if anyone can help me. I am trying to get [ValidateAntiForgeryToken] action method to fire and it appears not be. I was trying to check if the anti forgery token logic was actually ...
0
votes
0
answers
35
views
Issue with RadioButtonFor in Index.cshtml - ASP.NET MVC 5
In my Index.cshtml in ASP.NET MVC 5, I have the following code and it works fine.
<div>@Html.DisplayNameFor(model => model.IsEnrolled) Enrolled </div>
But, if I replace the same code ...
0
votes
1
answer
22
views
razor library loading views from different location
My app implements plugin system (razor libraries). App is using razor runtime compilation. Razor library contains few ViewComponents with custom structure described below.
Razor library structure:
...
0
votes
0
answers
41
views
Is it possible to create dynamic ASP.NET Core Razor view and controller file during runtime?
My requirement is to create dynamic razor view and controller save at project location at run time. If I call newly created controller then it will render newly created view also. The files are ...
0
votes
0
answers
18
views
Razor RuntimeBinderException - ViewBag object is null, even though it's not
I'm working on converting a project from .NET 472 to .NET8. All this code is for .net 8 web app
I need to render a razor view into html so that I can then convert it to a PDF. I have the code to do ...
1
vote
0
answers
38
views
Converting UTC time in model to Local time in view
I have a C# model that includes a list of items, and each item has a DateTime property containing a time that is represented as UTC.
I need to render those times to the UI, which is a cshtml page, and ...