ASP MVC web配置访问控制器动作方法

时间:2014-09-09 11:17:59

标签: c# asp.net asp.net-mvc

基本上我想知道是否可以通过web配置链接到控制器动作方法?

下面的示例可以直接链接到谷歌,但我希望它链接到我的控制器操作方法,这可能吗?

<add key="return" value="https://www.google.com/" />

   {
        public PayPalModel(bool useSandbox)
        {
            this.cmd = "_xclick";
            this.business = ConfigurationManager.AppSettings["business"];
            this.cancel_return = ConfigurationManager.AppSettings["cancel_return"];
            this.@return = ConfigurationManager.AppSettings["return"];
            if (useSandbox)
            {
                this.actionURL = ConfigurationManager.AppSettings["test_url"];
            }
            else
            {
                this.actionURL = ConfigurationManager.AppSettings["Prod_url"];
            }

            this.notify_url = ConfigurationManager.AppSettings["notify_url"];

            this.currency_code = ConfigurationManager.AppSettings["currency_code"];
        }        

   }

0 个答案:

没有答案