We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Blazor

Thread ID:

Created:

Platform:

Replies:

144300 Apr 29,2019 04:23 PM UTC ASP.NET Core - EJ 2 0
loading
Tags: General
Charles Shepherd
Asked On April 29, 2019 04:23 PM UTC

Help! We have a basic razor page app.  We would like to add Blazor components.  We have no problem getting this to work via replicating the steps in the 04/16 Blazor Update video or using the Blazor documentation.  However, once we add the Blazor component to a Razor page, all of our asp-page links no longer work.  The url changes in the address bar, but we remain on the same page.  The startup file is as follows:

public void ConfigureServices(IServiceCollection services)

        {

            services.Configure<CookiePolicyOptions>(options =>

            {

                options.CheckConsentNeeded = context => true;

            });

 

 

            services.AddRazorPages()

                .AddNewtonsoftJson();

 

            services.AddServerSideBlazor();

        }

 

        public void Configure(IApplicationBuilder app, IWebHostEnvironment env)

        {

            if (env.IsDevelopment())

            {

                app.UseDeveloperExceptionPage();

            }

            else

            {

                app.UseExceptionHandler("/Error");

                app.UseHsts();

            }

 

            app.UseHttpsRedirection();

            app.UseStaticFiles();

 

            app.UseCookiePolicy();

 

            app.UseRouting();

 

            app.UseAuthorization();

 

            app.UseEndpoints(endpoints =>

            {

                endpoints.MapRazorPages();

                endpoints.MapBlazorHub();

            });

        }

 

If some one can point me to a multi page tutorial with Razor Pages and Blazor Components, I’m sure we can figure this out! Thanks in advance! 

 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon