【发布时间】:2020-02-20 20:38:32
【问题描述】:
我想将我的页面 URL 与代表请求过滤器的对象(productName、categoryId .etc)绑定。如何使用查询字符串将它们绑定到 blazor 中?
@page "/products/{filter}"
...
@code {
public Filter filter = new Filter()
{
SearchedName = "Test",
CategoryId = 1
};
}
我想要这样的东西。在 Asp.Net Core 中,我能够将对象与表单和查询字符串绑定,但在 blazor 中我遇到了一些麻烦。你能为此提供解决方案吗? 提前致谢!
【问题讨论】:
标签: c# asp.net-core blazor