Results 1 to 3 of 3

Thread: unable to route value using asp.net visual basic Project

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Sep 2020
    Location
    Kampala
    Posts
    30

    unable to route value using asp.net visual basic Project

    Name:  routing.jpg
Views: 54
Size:  27.7 KB

    this code is inside my route config file

    Code:
    Imports System.Web.Routing
    Imports Microsoft.AspNet.FriendlyUrls
    
    Public Module RouteConfig
        Sub RegisterRoutes(ByVal routes As RouteCollection)
            Dim settings As FriendlyUrlSettings = New FriendlyUrlSettings()
            settings.AutoRedirectMode = RedirectMode.Permanent
            routes.EnableFriendlyUrls(settings)
        End Sub
    
        Sub RegisterRoutes2(routes As RouteCollection)
            ' routes.MapPageRoute("DisplayBlog", "Blogs/{BlogId}/{Slug}.aspx", "~/Forms/DisplayBlog.aspx")
    
            '  routes.MapPageRoute("DisplayBlog", "Displayblog/{BlogId}.aspx", "~/Forms/DisplayBlog.aspx")
    
            routes.MapPageRoute("DisplayBlog", "Blogs/{BlogId}/{Slug}.aspx", "~/Forms/DisplayBlog.aspx")
    
        End Sub
    End Module

  2. #2
    PowerPoster jdc2000's Avatar
    Join Date
    Oct 2001
    Location
    Idaho Falls, Idaho USA
    Posts
    2,165

    Re: unable to route value using asp.net visual basic Project

    So, what does or does not happen when you try this? What error message(s), if any, do you get?

  3. #3
    Frenzied Member PlausiblyDamp's Avatar
    Join Date
    Dec 2016
    Location
    Newport, UK
    Posts
    1,927

    Re: unable to route value using asp.net visual basic Project

    Where is RegisterRoutes2 being called from?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width