Skip to main content

All Questions

Tagged with
0 votes
0 answers
29 views

In one of the cshtml files,namespaces can not be found

I am using visual studio 2022 .net 6. All the other cshtml files within the same project are not showing any issues. Only in one cshtml file, the namespaces are not able to be found. All the ...
Hchavan's user avatar
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=&...
molly1312's user avatar
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 ...
Jax Harris's user avatar
0 votes
0 answers
51 views

ASP.NET Core: how/where to call the SignOutAsync to logout from a custom authentication?

In an ASP.NET Core (razor pages) project I've implemented a custom authentication with a cookie that carries the custom claims, and I've specified login and logout pages/paths via the ...
whatever's user avatar
  • 3,333
0 votes
1 answer
65 views

ASP.NET Core: why is returning a Razor view + its model via a controller not the same of navigating to that Razor page?

I noticed that if you try to access the ViewData dictionary in a Razor view returned via a controller (return View("<RazorPageName>", new RazorPageNameModel())), it is null. This means ...
whatever's user avatar
  • 3,333
0 votes
1 answer
64 views

Guidance On How To Approach Reporting for Razor Page Report

I'm not sure where to begin with this one. I have a database table called Trip. In this table, there is the following info on each row of data: TripId ClientName PickUpDateTime PickUpLocation ...
MelB's user avatar
  • 173
0 votes
2 answers
82 views

ArgumentException on async get method in repository. ASP.NET Core - Razor Pages

I'm asking this question because I haven't found any solution. I rewrote my code multiple times by tutorials but nothing changed. Broken query method in ReadRepository.cs: public async Task<T> ...
dorvazgon's user avatar
0 votes
1 answer
17 views

Can I differentiate between ErrorMessage and diplayed error text in Razor pages

I'm coming from a Web Forms background and attempting to learn Razor pages. In Web Forms, I use the asp:Validation controls pretty extensively. These validation controls give me the option to specify ...
yougotiger's user avatar
0 votes
0 answers
43 views

Is there a way to convert a List of type IFormFile to IFormFileCollection

In my code I have a OnPost() method that recieves an IFormCollection, through this I pass a few files through. One of these files I always want to always be the the index[0] of a List<byte[]>. ...
kado-kliewer23's user avatar
0 votes
2 answers
158 views

ASP.NET Core 8.0 Razor Pages: rewriting _Layout.cshtml.css => {application}.styles.css not found (404)

After making a new .NET8.0 Razor Pages (ASP.NET Core) project, I removed JQuery- and Bootstrap-Libraries. Then I edited _Layout.cshtml.css. When running the project, my CSS-rules are not applied, ...
Flipps's user avatar
  • 11
0 votes
1 answer
22 views

General Guidance on How to Copy One Database Row to Another Using Razor Pages

I have an app where the user would like to be able to enter a record for a client and then copy that record to another client. I'm picturing doing this after the record is created and saved. Perhaps ...
MelB's user avatar
  • 173
2 votes
1 answer
66 views

What is the most appropriate default string value for a [Required] data annotation? [closed]

I'm learning model binding and validation for C# .NET 8 Razor Pages. I set up a simple input model to test validation (from ASP.NET Core Razor Pages in Action, Mike Brind): public class ...
canyon's user avatar
  • 33
0 votes
2 answers
56 views

Razor page SiteContent data binding does not work

I have a razor page with .Net 8 core and i have set the rendermode to InteractiveServer, @rendermode InteractiveServer I am using the SectionContent with a variable to bind the value to the front end,...
Sajeetharan's user avatar
0 votes
0 answers
57 views

Facing problem updating multiple existing items of data in the database from backend in ASP.NET Core

I'm currently working on an ASP.NET Core application where I need to update a list of holidays in the database, including dynamic holidays based on user input. However, I'm encountering some issues ...
anu gupta's user avatar
0 votes
2 answers
779 views

Runtime Compilation of Razor Pages Does Not Work .NET 8 VS2022

I am having a hard time enabling runtime compilation of Razor pages under IIS v10.0, using Visual Studio 2022 17.8.8, .NET 8.0.103 (Windows 11). I have followed the instructions at https://learn....
Optimax's user avatar
  • 1,584

15 30 50 per page
1
2 3 4 5
46