Data Access Worldwide Knowledge Base

Article ID 2032
Article Title HOWTO: Redirect to Electos page
Article URL http://www.dataaccess.com/kbasepublic/kbprint.asp?ArticleID=2032
KBase Category ELECTOS
Date Created 08/06/2004
Last Edit Date 08/10/2004


Article Text
QUESTION:
Is it possible to redirect to internal electos pages on a clean way?

ANSWER:
Yes, this can be done using the label feature of electos.

This is what you need to do: The page that should be linked needs to get a unique label (when a page in the Studio is selected this can be set using the menu on the right).

Then, we create a simple ASP file that gets the PageId by the label and the template by the PageId in the AppHTML folder from the site.

Example:
<%
    sLabel = request("label") // Get the label
    
    If(sLabel <> "") Then    
        iPageID = oPublisher.call("Get_PageIDByLabel", sLabel)
    Else
        iPageID = 0
    End If
    
    If (iPageID <> 0) Then
        sTemplate = oPublisher.call("Get_ASPTemplate", iPageID) // Get the template

        Response.ReDirect(sTemplate & "?pageid=" & iPageID) // Redirect to the page
    Else
        Response.ReDirect("http://www.dataaccess.nl/") // If no page is found
    End If
%>


Then, on the location we want to redirect to (example http://www.dataaccess.nl/Training/) we create a default.htm that creates a full size invisible frame and opens the just created asp file with the correct label.

Example:

<html>
<head>
<title>Data Access Europe B.V. </title>
<head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<frameset rows="100%,*" border="0" frameborder="0" framespacing="0">
<frame src="http://www.dataaccess.nl/PageByLabel.Asp?Label=Training" frameborder="0">
</frameset>
<noframe>
<body>
Please download a newer browser!!
</body>
</noframes>
</html>



Contributed By:
Harm Wibier
Company: Data Access Europe
email: harm.wibier@dataaccess.eu
Web Site: http://www.dataaccess.eu


Email this Article
Email this Article to a Colleague
Send Feedback on this Article to Data Access Worldwide
Copyright ©2010 Data Access Corporation. All rights reserved.

The information provided in the Data Access Technical Knowledge Base is provided "as is" without warranty of any kind. Data Access Corporation disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. In no event shall Data Access Corporation or its suppliers be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages, even if Data Access Corporation or its suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing limitation may not apply.