【发布时间】:2017-07-20 12:25:31
【问题描述】:
如何将 ASP Web 表单使用 Visual Basic 与 ASP MVC 4 使用 C# 集成。帮帮我!!! 我有问题:
文件 Global.asax.cs:
AreaRegistration.RegisterAllAreas();
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
RouteConfig.RegisterRoutes(RouteTable.Routes);
BundleConfig.RegisterBundles(BundleTable.Bundles);
文件 Login.aspx.vb:
Partial Class Login
Inherits System.Web.UI.Page
Private WithEvents objA2Global As A2Component.A2Global ' RapidISGlobal ' A2Component.A2Global
文件 Global.asax:
%@ Application Codebehind="Global.asax.cs" Inherits="RapidIS.MvcApplication" Language="VB" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<%@ Import Namespace="System.Data" %>
文件路由配置:
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.IgnoreRoute("{resource}.aspx/{*pathInfo}");
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
}
protected void Application_Start()
{
RegisterRoutes(RouteTable.Routes);
}
【问题讨论】:
-
请在您的问题中提供您的错误和代码的副本。图片没用(即使现在可以看到)。
-
我加了一些请帮帮我!!!
标签: asp.net asp.net-mvc vb.net webforms