diff --git a/Blazor/Blazor/Components/DisplayQuestions.razor b/Blazor/Blazor/Components/DisplayQuestions.razor new file mode 100644 index 0000000..fdf398d --- /dev/null +++ b/Blazor/Blazor/Components/DisplayQuestions.razor @@ -0,0 +1,32 @@ +@page "/displayquestions/{QuestionId:int}" + +@if (question != null) +{ +
@answer.Content
+ } + else + { +@answer.Content
+ } +Question not found
+} diff --git a/Blazor/Blazor/Components/DisplayQuestions.razor.cs b/Blazor/Blazor/Components/DisplayQuestions.razor.cs new file mode 100644 index 0000000..91383e1 --- /dev/null +++ b/Blazor/Blazor/Components/DisplayQuestions.razor.cs @@ -0,0 +1,42 @@ +using Blazor.Models; +using Blazor.Pages; +using Blazor.Pages.Questions; +using Blazor.ViewClasses; +using Microsoft.AspNetCore.Components; +using static System.Net.WebRequestMethods; + +namespace Blazor.Components +{ + public partial class DisplayQuestions + { + [Parameter] + public int QuestionId { get; set; } + + public Question question = new(); + + private List