Logo video2dn
  • Сохранить видео с ютуба
  • Категории
    • Музыка
    • Кино и Анимация
    • Автомобили
    • Животные
    • Спорт
    • Путешествия
    • Игры
    • Люди и Блоги
    • Юмор
    • Развлечения
    • Новости и Политика
    • Howto и Стиль
    • Diy своими руками
    • Образование
    • Наука и Технологии
    • Некоммерческие Организации
  • О сайте

Скачать или смотреть Referencing a razor page from a Razor Class Library is giving a 404 error

  • Emrah KAYA
  • 2024-10-30
  • 15
Referencing a razor page from a Razor Class Library is giving a 404 error
  • ok logo

Скачать Referencing a razor page from a Razor Class Library is giving a 404 error бесплатно в качестве 4к (2к / 1080p)

У нас вы можете скачать бесплатно Referencing a razor page from a Razor Class Library is giving a 404 error или посмотреть видео с ютуба в максимальном доступном качестве.

Для скачивания выберите вариант из формы ниже:

  • Информация по загрузке:

Cкачать музыку Referencing a razor page from a Razor Class Library is giving a 404 error бесплатно в формате MP3:

Если иконки загрузки не отобразились, ПОЖАЛУЙСТА, НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если у вас возникли трудности с загрузкой, пожалуйста, свяжитесь с нами по контактам, указанным в нижней части страницы.
Спасибо за использование сервиса video2dn.com

Описание к видео Referencing a razor page from a Razor Class Library is giving a 404 error

Hello everyone! I hope this video has helped solve your questions and issues. This video is shared because a solution has been found for the question/problem. I create videos for questions that have solutions. If you have any other issues, feel free to reach out to me on Instagram:   / ky.emrah  

Below, you can find the text related to the question/problem. In the video, the question will be presented first, followed by the answers. If the video moves too fast, feel free to pause and review the answers. If you need more detailed information, you can find the necessary sources and links at the bottom of this description. I hope this video has been helpful, and even if it doesn't directly solve your problem, it will guide you to the source of the solution. I'd appreciate it if you like the video and subscribe to my channel!Referencing a razor page from a Razor Class Library is giving a 404 error

I am trying to reference a razor page contained in a Razor Class Library in a Blazor project. When I go to the route of my page I am getting a 404 error.
Steps to recreate
Steps to recreate
Create a new solution as a Blazor Web App (.NET 8.0) template.
Add a new Razor Class Library project (Support pages and views checked)
Edit the Page1.cshtml and have the following at the top:
@page "/test"

@page "/test"

Add a reference to the Razor Class Library(RazorClassLibrary1) from the Blazor App (BlazorApp1).
In BlazorApp1 edit Routes.razor to be:
Router AppAssembly="typeof(Program).Assembly" AdditionalAssemblies="new[]{typeof(RazorClassLibrary1.MyFeature.Pages.Page1Model).Assembly}"
Found Context="routeData"
RouteView RouteData="routeData" DefaultLayout="typeof(Layout.MainLayout)" /
FocusOnNavigate RouteData="routeData" Selector="h1" /
/Found
/Router

Router AppAssembly="typeof(Program).Assembly" AdditionalAssemblies="new[]{typeof(RazorClassLibrary1.MyFeature.Pages.Page1Model).Assembly}"
Found Context="routeData"
RouteView RouteData="routeData" DefaultLayout="typeof(Layout.MainLayout)" /
FocusOnNavigate RouteData="routeData" Selector="h1" /
/Found
/Router

Edit Program.cs of BlazorApp1 to include:
app.MapRazorComponents App ()
.AddInteractiveServerRenderMode()
.AddAdditionalAssemblies([typeof(RazorClassLibrary1.MyFeature.Pages.Page1Model).Assembly] );

app.MapRazorComponents App ()
.AddInteractiveServerRenderMode()
.AddAdditionalAssemblies([typeof(RazorClassLibrary1.MyFeature.Pages.Page1Model).Assembly] );

Start the application and browse to /test and you get a 404. What am I doing wrong?


Tags: c#,blazor,razor-pages,.net-8.0,razor-class-librarySource of the question:
https://stackoverflow.com/questions/7...

Question and source license information:
https://meta.stackexchange.com/help/l...
https://stackoverflow.com/

Комментарии

Информация по комментариям в разработке

Похожие видео

  • О нас
  • Контакты
  • Отказ от ответственности - Disclaimer
  • Условия использования сайта - TOS
  • Политика конфиденциальности

video2dn Copyright © 2023 - 2025

Контакты для правообладателей [email protected]