I am trying to convert this code, but getting some error this is the main link of the code.
I am getting these 2 errors:
Type “domainroute is not defined
and
‘optional’ is not a member of ‘system.web.UI.webControls.routeParameter’
Code:
public class HttpDomainRoute
: DomainRoute
{
public HttpDomainRoute(string domain, string url, RouteValueDictionary defaults)
: base(domain, url, defaults, HttpControllerRouteHandler.Instance)
{
}
public HttpDomainRoute(string domain, string url, object defaults)
: base(domain, url, new RouteValueDictionary(defaults), HttpControllerRouteHandler.Instance)
{
}
}
to this asp.net vb 4
Public Class HttpDomainRoute
Inherits DomainRoute
Public Sub New(domain As String, url As String, defaults As RouteValueDictionary)
MyBase.New(domain, url, defaults, HttpControllerRouteHandler.Instance)
End Sub
Public Sub New(domain As String, url As String, defaults As Object)
MyBase.New(domain, url, New RouteValueDictionary(defaults), HttpControllerRouteHandler.Instance)
End Sub
End Class
This class seems to inherit from a class called
DomainRoute. This is not a standard class that is part of the MVC framework so make sure you also have this class defined. Or at least reference the assembly where it resides. I guess you’ve taken itfrom here. So go ahead and include that class as well.