2017-03-01 63 views
-4

如何整合asp網頁窗體使用Visual Basic與asp MVC 4使用C#。幫幫我! 我有問題:集成asp Web窗體與asp mvc

enter image description here

文件的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); 
    } 
+1

請在您的問題中提供您的錯誤和代碼的副本。圖像是無用的(即使他們現在可以看到)。 – Tom

+0

我添加一些請幫助我! –

回答

0

如果您正在使用它被分成兩個文件的部分類,你必須寫兩個文件在同一類的聲明。我已經閱讀了錯誤信息,並且表示您必須對這些文件使用相同的配置。