我是 C#.net MVC 的新手,正在尝试将 FullCalendar
添加到 MVC 应用程序。
FullCalendar
脚本会自动将 ?start={}&end={}
添加到 URL 中...很好,但我不知道如何使用 querystring
Controller 中的变量。
我在 Webforms 应用程序中使用的方法不起作用。我需要向 Controller 添加什么才能访问 querystring
变量?
最佳答案
public ActionResult SomeAction(string start, string end)
框架会将查询字符串参数映射到方法参数。
关于c# - 在 MVC Controller 中使用查询字符串变量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11488249/