C# 主控制器方法参数未显示

C# 主控制器方法参数未显示,c#,asp.net-mvc,methods,parameters,controller,C#,Asp.net Mvc,Methods,Parameters,Controller,我在MVC web应用程序(名为“webapp”)的主控制器中修改了about方法,如下所示 public String About(String x) { return "Hello this is the About action and the parameter you entered is "+x; } 但当我在web浏览器的URL中运行web应用时,显示为“” 输出是 您好这是关于操作,您输入的参数是 输出未显示参数值,在这种情况下为10!如何解决此问题?尝试运行此url:

我在MVC web应用程序(名为“webapp”)的主控制器中修改了about方法,如下所示

public String About(String x)
{
    return "Hello this is the About action and the parameter you entered is "+x;
}
但当我在web浏览器的URL中运行web应用时,显示为“” 输出是

您好这是关于操作,您输入的参数是


输出未显示参数值,在这种情况下为10!如何解决此问题?

尝试运行此url:
“http://localhost/WebApplication3/Home/About?x=10“
Thanx它在工作,但为什么我的方法不工作?可能您没有为此配置路由。如何为此配置路由?将字符串参数命名为“id”而不是“x”。