blazor

Blazor - Cascading Dropdown menu on InputSelect not loading

佐手、 提交于 2020-05-24 05:17:42
问题 I'm trying to load the below table, however, the drop-down menu for the school is not loading. It looks to me like it's null. And I figured that the InputSelect doesn't work with an INT ID yet in Blazor. I filled the below for and the country code was populated from a country table as a lookup based on the country chosen from the InputSelect column, "Country Name", circled in blue. When I select the country, I expect it to load the correspionding countrycode but not the case. Razor Page

Blazor - Cascading Dropdown menu on InputSelect not loading

核能气质少年 提交于 2020-05-24 05:17:25
问题 I'm trying to load the below table, however, the drop-down menu for the school is not loading. It looks to me like it's null. And I figured that the InputSelect doesn't work with an INT ID yet in Blazor. I filled the below for and the country code was populated from a country table as a lookup based on the country chosen from the InputSelect column, "Country Name", circled in blue. When I select the country, I expect it to load the correspionding countrycode but not the case. Razor Page

Blazor hosted - authorize immediately before displaying application

家住魔仙堡 提交于 2020-05-24 05:13:11
问题 Can anybody give me a helping push to get my hosted Blazor application (Client, Server and Shared) to request a login immediately, before the application is initially shown. I want the experience that a user must log in before accessing the application at all. My starting point is the Blazor Webassembly (hosted) template with Api Authorization (Individual User Accounts) Using the Authorize attribute on either server-side actions or a client-side Razor page will not initiate the authentication

allowdoubleescaping = “true” in IIS Express Config Not Working

ε祈祈猫儿з 提交于 2020-05-23 21:30:51
问题 I get HTTP Error 404.11 - Not Found The request filtering module is configured to deny a request that contains a double escape sequence. Error when I send a request to a .razor page in Blazor, The link is dynamically built and sent to users email: string confirmationLink = $"{HttpContext.Request.Scheme}://{Request.Host}/account/confirmemail/{System.Web.HttpUtility.UrlEncode(user.Id)}/{System.Web.HttpUtility.UrlEncode(confirmationToken)}"; I modified the IIS Express config files in five places

Calling async methods in Blazor view

空扰寡人 提交于 2020-05-23 10:03:51
问题 I have a server-side blazor client and I'm trying to modify the MainLayout razor page by having a Login check. I'm currently using Blazored for localstorage saving, and I'm currently using to see if a token is saved to see if user is logged in, however I'm not sure how I translate this in the if statement in razor page because it wants async method. My login check is pretty simple as shown below. public async Task<bool> IsLoggedIn() { return await m_localStorage.ContainKeyAsync("token")

Calling async methods in Blazor view

南楼画角 提交于 2020-05-23 10:03:23
问题 I have a server-side blazor client and I'm trying to modify the MainLayout razor page by having a Login check. I'm currently using Blazored for localstorage saving, and I'm currently using to see if a token is saved to see if user is logged in, however I'm not sure how I translate this in the if statement in razor page because it wants async method. My login check is pretty simple as shown below. public async Task<bool> IsLoggedIn() { return await m_localStorage.ContainKeyAsync("token")

How to know when EventCallback has been fired?

旧时模样 提交于 2020-05-17 06:59:08
问题 I'm doing some testing with razor components but I have an issue to update a property from the child component to the grand-parent component. I'm using EventCallback to update my parent component when the child component updates a property. It works well for architecture with two levels (ParentComponent/ChildComponent) however, it doesn't work with three levels (GrandParentComponent/ParentComponent/ChildComponent). Let's take an example with three components A, B and C. - A

Server-side Blazor page post to Razor page http error 400

只谈情不闲聊 提交于 2020-05-16 12:31:42
问题 I am trying to post my username and password from a Blazor page (.razor) to a Razor Page(.cshtml) but I get http error 400 all the time. LoginControl.razor <form method="post" action="login"> <input type="text" name="username" @bind="@Username" placeholder="User Name" />    <input type="password" name="password" placeholder="Password" @bind="@Password" />    <button class="ml-md-auto btn btn-primary">Loggin</button> </form> Login.cshtml.cs public async Task<IActionResult> OnPostAsync(

Server-side Blazor page post to Razor page http error 400

别来无恙 提交于 2020-05-16 12:31:24
问题 I am trying to post my username and password from a Blazor page (.razor) to a Razor Page(.cshtml) but I get http error 400 all the time. LoginControl.razor <form method="post" action="login"> <input type="text" name="username" @bind="@Username" placeholder="User Name" />    <input type="password" name="password" placeholder="Password" @bind="@Password" />    <button class="ml-md-auto btn btn-primary">Loggin</button> </form> Login.cshtml.cs public async Task<IActionResult> OnPostAsync(

onChange event not firing Blazor InputSelect

有些话、适合烂在心里 提交于 2020-05-16 03:21:15
问题 I have the following Code for an InputSelect <InputSelect class="form-control form-control form-control-sm" placeholder="Role" disabled="@IsReadOnly" @bind-Value="Model.Role" @onchange="@RoleChanged"> <option value="Member">Member</option> <option value="Admin">Admin</option> <option value="Pioner">Pioneer</option> <option value="Retailer">Retailer</option> </InputSelect> And for the Code: bool ShowCreated; bool ShowUpdated; bool IsReadOnly; string SelectedRole; public EditForm AccountForm;