使用查询字符串变量MVC控制器 [英] Use querystring variables in MVC controller

查看:113
本文介绍了使用查询字符串变量MVC控制器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新的C#.NET MVC,我试图 FullCalendar 添加到MVC应用程序。

I am new to C#.net MVC and am trying to add FullCalendar to an MVC application.

FullCalendar 脚本会自动添加开始= {}&放大器;年底= {} 来的网址.. 。其中是好的,但我不知道如何使用查询字符串变量的控制器。

The FullCalendar script automatically adds ?start={}&end={} to the URL...which is fine, but I have no idea how to use querystring variables in a controller.

我Web表单中使用的方法应用程序不起作用。什么我需要添加到控制器访问查询字符串变量?

The methods I used in Webforms applications don't work. What do I need to add to the controller to access the querystring variables?

推荐答案

我想它了...终于找到另一个<一个href=\"http://stackoverflow.com/questions/998389/how-can-i-access-the-entire-query-string-in-an-asp-net-controller-action\">article就可以了。

I figured it out...finally found another article on it.

string start = Request.QueryString["start"];

string end = Request.QueryString["end"];

这篇关于使用查询字符串变量MVC控制器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆