mvc的一个小问题
问题描述:别人给我一aps.net的项目,让我看看,我也不知道应该帖那一段出来看看
里面有mvc的代码在里面,以前没有接触过
运行后出现以下几个问题
编译环境介绍:
开发方:用mvc版本未知
我自己本机的mvc的版本有2~4都有
vs2010
错误 2 在以下方法或属性之间的调用不明确:“System.Web.Mvc.T4Extensions.GetT4MVCResult(System.Web.Mvc.ActionResult)”和“System.Web.Mvc.T4Extensions.GetT4MVCResult(System.Web.Mvc.ActionResult)” E:\StraxImages+v2.0\StraxImages Source Code v2.0\app\StraxImages.WebUI\ImageController.generated.cs 30 28 StraxImages.WebUI
错误 59 在以下方法或属性之间的调用不明确:“System.Web.Mvc.T4Extensions.BeginForm(System.Web.Mvc.AjaxHelper, System.Web.Mvc.ActionResult, System.Web.Mvc.Ajax.AjaxOptions, object)”和“System.Web.Mvc.T4Extensions.BeginForm(System.Web.Mvc.AjaxHelper, System.Web.Mvc.ActionResult, System.Web.Mvc.Ajax.AjaxOptions, object)” E:\StraxImages+v2.0\StraxImages Source Code v2.0\app\StraxImages.WebUI\T4MVC.cs 108 20 StraxImages.WebUI
T4MVC.cs的代码
// <auto-generated />
// This file was generated by a T4 template.
// Don't change it directly as your change would get overwritten. Instead, make changes
// to the .tt file (i.e. the T4 template) and save it to regenerate this file.
// Make sure the compiler doesn't complain about missing Xml comments
#pragma warning disable 1591
#region T4MVC
using System;
using System.Diagnostics;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Web;
using System.Web.Hosting;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html;
using System.Web.Routing;
using T4MVC;
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public static class MVC {
public static StraxImages.WebUI.Controllers.AnalysisHistoryController AnalysisHistory = new StraxImages.WebUI.Controllers.T4MVC_AnalysisHistoryController();
public static StraxImages.WebUI.Controllers.BaseController Base = new StraxImages.WebUI.Controllers.T4MVC_BaseController();
public static StraxImages.WebUI.Controllers.ClientController Client = new StraxImages.WebUI.Controllers.T4MVC_ClientController();
public static StraxImages.WebUI.Controllers.ErrorController Error = new StraxImages.WebUI.Controllers.T4MVC_ErrorController();
public static StraxImages.WebUI.Controllers.FilereferenceController Filereference = new StraxImages.WebUI.Controllers.T4MVC_FilereferenceController();
public static StraxImages.WebUI.Controllers.FolderController Folder = new StraxImages.WebUI.Controllers.T4MVC_FolderController();
public static StraxImages.WebUI.Controllers.HomeController Home = new StraxImages.WebUI.Controllers.T4MVC_HomeController();
public static StraxImages.WebUI.Controllers.ImageController Image = new StraxImages.WebUI.Controllers.T4MVC_ImageController();
public static StraxImages.WebUI.Controllers.NewRegistrationController NewRegistration = new StraxImages.WebUI.Controllers.T4MVC_NewRegistrationController();
public static StraxImages.WebUI.Controllers.PriceStructureController PriceStructure = new StraxImages.WebUI.Controllers.T4MVC_PriceStructureController();
public static StraxImages.WebUI.Controllers.ShareFolderListController ShareFolderList = new StraxImages.WebUI.Controllers.T4MVC_ShareFolderListController();
public static StraxImages.WebUI.Controllers.UserController User = new StraxImages.WebUI.Controllers.T4MVC_UserController();
public static T4MVC.SharedController Shared = new T4MVC.SharedController();
}
namespace T4MVC {
}
namespace System.Web.Mvc {
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public static class T4Extensions {
public static MvcHtmlString ActionLink(this HtmlHelper htmlHelper, string linkText, ActionResult result) {
return htmlHelper.RouteLink(linkText, result);
}
public static MvcHtmlString ActionLink(this HtmlHelper htmlHelper, string linkText, ActionResult result, object htmlAttributes) {
return ActionLink(htmlHelper, linkText, result, new RouteValueDictionary(htmlAttributes));
}
public static MvcHtmlString ActionLink(this HtmlHelper htmlHelper, string linkText, ActionResult result, IDictionary<string, object> htmlAttributes) {
return htmlHelper.RouteLink(linkText, result, htmlAttributes);
}
public static MvcForm BeginForm(this HtmlHelper htmlHelper, ActionResult result) {
return htmlHelper.BeginForm(result, FormMethod.Post);
}
public static MvcForm BeginForm(this HtmlHelper htmlHelper, ActionResult result, FormMethod formMethod) {
return htmlHelper.BeginForm(result, formMethod, null);
}
public static MvcForm BeginForm(this HtmlHelper htmlHelper, ActionResult result, FormMethod formMethod, object htmlAttributes) {
return BeginForm(htmlHelper, result, formMethod, new RouteValueDictionary(htmlAttributes));
}
public static MvcForm BeginForm(this HtmlHelper htmlHelper, ActionResult result, FormMethod formMethod, IDictionary<string, object> htmlAttributes) {
var callInfo = result.GetT4MVCResult();
return htmlHelper.BeginForm(callInfo.Action, callInfo.Controller, callInfo.RouteValueDictionary, formMethod, htmlAttributes);
}
public static void RenderAction(this HtmlHelper htmlHelper, ActionResult result) {
var callInfo = result.GetT4MVCResult();
htmlHelper.RenderAction(callInfo.Action, callInfo.Controller, callInfo.RouteValueDictionary);
}
public static MvcHtmlString Action(this HtmlHelper htmlHelper, ActionResult result) {
var callInfo = result.GetT4MVCResult();
return htmlHelper.Action(callInfo.Action, callInfo.Controller, callInfo.RouteValueDictionary);
}
public static string Action(this UrlHelper urlHelper, ActionResult result) {
return urlHelper.RouteUrl(result.GetRouteValueDictionary());
}
#endregion T4MVC
#pragma warning restore 1591
字数有限,代码没有贴完