Skip to main content

Questions tagged [razor-pages]

Apply to questions related to the Razor Pages Framework, which is a feature of ASP.NET Core starting in ASP.NET Core version 2.0.

0 votes
0 answers
11 views

How to get value to text field after model validation message

The PurchaseOrderNumber is generated by another function and is automatically filled in the relevant field when creating a purchase order. However, if the form submission fails due to validation ...
Rashmika's user avatar
0 votes
1 answer
17 views

Asp.net core razor pages BindProperty collections List not Working

My plan is that I fill a list of data in OnGet and after sending it to the html page, I checkMark some lines and Fill some input on table, and finally it is posted to the server. But in OnPost, the ...
Ashkan's user avatar
  • 89
0 votes
0 answers
6 views

Razor page model, unexplainable null reference exception

The UICorp is just a class with properties (all value type) like string, int, decimal, enum, DateTime..... I really have no idea why it gives null exception here. public class UICorp { public ...
s k's user avatar
  • 4,972
0 votes
1 answer
22 views

Razor pages - This localhost page can’t be found

After adding a new razor page, all other website pages worked normally but when redirecting to the new page I get HTTP ERROR 404 "This localhost page can’t be found" MS Visual Studio 2022, ...
Ayad Kara Kâhya's user avatar
0 votes
0 answers
24 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
1 vote
1 answer
29 views

why modelstate.isvalid always false despite the picture property in model getting assigned

I'm working on a razor pages project. I have an employee model which has a picture property of type byte array. Despite picture being assigned byte array when I check modelstate.isvalid, emp.picture ...
ambrin yaqub's user avatar
0 votes
0 answers
35 views

Is it safe to move scaffolded Identity pages from Areas\Identity\Pages to main site's Pages?

I have a Razor website built with ASP.NET Core 8 and the Identity framework. I have scaffolded the Identity pages, and they seem to work fine. But I don't like their paths - "/Identity/Account/...
Eugene Mayevski 'Callback's user avatar
0 votes
1 answer
30 views

ASP.NET Core Razor page (MVVM) not able to post back a complex data type

Is there a way to BindProperty on a complex type in ASP.NET Core and MVVM? I'm having a problem binding back data from what a user selected on a webpage back to the callback method. Simple data types ...
Bill's user avatar
  • 1,111
0 votes
2 answers
37 views

InvalidOperationException: Unable to resolve service for type '...Context' while attempting to activate

My project is being built with asp.net core razor pages and dotnet 7 I have considered a separate layer for the database and my database is built in the Database First method The connection string is ...
Ashkan's user avatar
  • 89
0 votes
2 answers
53 views

Navigation Dropdowns in ASP.NET Core 8.0 Razor Pages - How to prevent opening new pages?

I am developing an ASP.NET Core 8.0 application using Razor Pages. I have implemented a dynamic navigation menu that needs to be consistently displayed across all pages of my application. The ...
Yuvraj Jadhav's user avatar
0 votes
1 answer
39 views

How to modify default text field in Razor page

My “Edit” view is scaffolded razor page with a form that populates values via the model. one property [DisplayName("MOVING DIRECTION")] public string Direction { get; set; } = null!; so ...
user2835586's user avatar
0 votes
1 answer
48 views

Understanding Error CS1579 foreach statement cannot operate on variables of type

Getting this error in my razor page app: Severity Code Description Project File Line Suppression State Error (active) CS1579 foreach statement cannot operate on variables of type '...
MelB's user avatar
  • 173
0 votes
2 answers
84 views

asp net core causes an error Fetch: TypeError

I am writing an application on asp net core with Razor Pages. I to long think about how process POST requests (OnPost in razor pages), after reading this page "https://learn.microsoft.com/ru-ru/...
Vasiliskb's user avatar
-1 votes
0 answers
49 views

ASP.NET Core Web App - Razor Pages Crashing in Production Server only

I created a web app using the ASP.Net Core Web App template which works fine in VS2022 on my laptop. I uploaded it to a shared hosting windows server and now its crashing. Symtoms; 1, It responds to ...
Ola's user avatar
  • 17
0 votes
0 answers
45 views

How to preserve large database query results on the server for future processing

I have an ASP.NET Core Razor pages application that displays data in a Javascript chart. In some scenarios, this chart can have up to 1 300 000 datapoints / database rows. Depending on the selected ...
kj49's user avatar
  • 45

15 30 50 per page
1
2 3 4 5
305