redirecting an asp page to aspx page causes error? Response.Redirect

Posted on 2008-11-12
Last Modified: 2013-12-14
im trying to redirect users who have bookmarked an unused asp page to a new aspx page.
Below is the code i used for the redirect.

As the application is used on different domains I cannot give the path for the whole domain name or absolute path.

The application is not able to find the controls which are referenced. Please see attached error message.

How do i give the redirect so that the aspx page loads the referenced controls.




Open in new window

Question by:nirisan
    LVL 8

    Expert Comment

    Try to use <% ResolveURL("../your_controls_path/control.ascx") %>

    Author Comment


    Im trying the two options below but its not helping...please advise..

    <%@ Register TagPrefix="CommonControls" TagName="Header" Src= "ResolveURL(../CommonControls/Header.ascx)" %>

    <%@ Register TagPrefix="CommonControls" TagName="Header" Src= ResolveURL("../CommonControls/Header.ascx") %>
    LVL 8

    Expert Comment

    If your CommonControls directory is located on root directory than you can use "~" to figure it out. If not, you need to use "~/directory_where_you_have_your_CommonControls_dir/CommonControls/Header.ascx"
    Like this
    <%@ Register TagPrefix="CommonControls" TagName="Header" Src= "~/CommonControls/Header.ascx" %>

    Accepted Solution

    I setup the a  virtual directory where the controls where and this solved the problem.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Join & Write a Comment

    In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
    How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from ( Go to that link and select download selenium in the right hand columnThat will then direct you to their downlo…
    The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.
    The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now