ParamRazorIndex.cshtml
@page "/razorindex"
@model WebApplication3.Views.Param.ParamRazorIndexModel
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
Param Razor Index
ParamRazorIndex.cshtml.cs
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace WebApplication3.Views.Param
{
public class ParamRazorIndexModel : PageModel
{
[BindProperty(SupportsGet = true)]
public string Path { get; set; } = "";
[BindProperty(SupportsGet = true)]
public string ApiKey { get; set; } = "";
public void OnGet(string path, string apiKey)
{
Path = path;
ApiKey = apiKey;
}
}
}