blazor-server-side

Blazor Textfield Oninput User Typing Delay

眉间皱痕 提交于 2019-12-05 08:14:17
How can I add a delay to an event (OnInput) in Blazor ? For example, if a user is typing in the text field and you want to wait until the user has finished typing. Blazor.Templates::3.0.0-preview8.19405.7 Code: @page "/" <input type="text" @bind="Data" @oninput="OnInputHandler"/> <p>@Data</p> @code { public string Data { get; set; } public void OnInputHandler(UIChangeEventArgs e) { Data = e.Value.ToString(); } } Solution: There is no single solution to your question. The following code is just one approach. Take a look and adapt it to your requirements. The code resets a timer on each keyup ,

Adding Server-Side Blazor to an existing MVC Core app

ⅰ亾dé卋堺 提交于 2019-12-05 07:48:20
I have a fully operative Blazor server-side project and a .NET Core 3 MVC project, both in the same solution. I'm now trying to use the components from the Blazor project in my MVC project. I've managed to get the components to render on an MVC page, but button clicks on the Blazor component don't trigger the onclick events for the components, instead I just get navigated to https://localhost:44341/ ? I'm unclear as to exactly what changes I need to make in the MVC solution to get this working? The official documentation talks about using components in and MVC project and it's mentioned in

The “TransformAppSettings” task failed unexpectedly

被刻印的时光 ゝ 提交于 2019-12-04 12:31:18
I have a .NET Core 3 Blazor (server side) application which I recently upgraded to .NET Core 3.0.1 preview 6 version from the preview 5 version. When I build and run it locally, it works fine; but when trying to publish it to a file system folder (in Framework-Dependent mode), it throws this error: C:\Program Files\dotnet\sdk\3.0.100-preview6-012264\Sdks\Microsoft.NET.Sdk.Publish\targets\TransformTargets\Microsoft.NET.Sdk.Publish.TransformFiles.targets(192,5): Error MSB4018: The "TransformAppSettings" task failed unexpectedly. System.IO.FileNotFoundException: Could not load file or assembly

Using SignInManager in server-side Blazor

余生颓废 提交于 2019-12-02 22:07:20
问题 Is it possible to use SignInManager without having some HTTPContext ? I'm making a Blazor server-side app and I need to make end-users signed in using PasswordSignInAsync() method of SignInManager . If there is other ways to do it with cookies or something else, I'll take it too, as long they are "clean" methods. If I could get also an explanation on how to configure for Startup.cs the solution, it will be perfect. 回答1: I'd strongly suggest that you use the Identity authentication system in

Authorization policies in blazor server side

流过昼夜 提交于 2019-12-02 14:58:26
问题 I'm trying to find docs on the blazor server side equivalent of asp.net core authorization policies, but can't seem to find anything. Can someone tell me what the mechanism is for authorization in blazor server side? 回答1: No authentication and authorization for Blazor exist right now. The Asp.Net team is currently working on it... You may read here the whole story: https://github.com/aspnet/AspNetCore/issues/4048 Hope this helps... 回答2: The latest preview -6 of .NET Core 3 has introduced

How do you create a API/IdentityServer/Blazor(server-side) application?

淺唱寂寞╮ 提交于 2019-11-28 06:38:12
问题 I attempted to build this application myself but, have hit several stumbling blocks along the way. I am thinking that it may be best to step back and take a larger look at what I am trying to create. There doesn't seem to be any documentation on how to make what I am looking for. (unless someone can point me in the right place I might have missed) Ultimately what I would like is to have a Blazor(server-side) application make API calls to use data in the app and then have an IdentityServer4