Hello,
here a user control named aff.ascx : (this control is used to see the
contains of a link)
<%@ Control Language="VB" %>
<script runat="server">
' Insert user control code here
Public adr As String
</script>
<!-- Insert content here -->
<div align="center">
Contrôle<br />
<% If adr <> "" Then
Server.execute(adr) <---- It's ok
End If%>
</div>
<p style="text-align: left">
</p>
__________________________________________________ __________________________________________________ ____________
Here the main Page
<%@ Page Language="VB" %>
<%@ Register Src="aff.ascx" TagName="aff" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<script runat="server">
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
aff.adr = "x.htm"
End Sub
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div style="text-align: left">
<span style="color: #99ffcc">
<uc1:aff ID="aff" runat="server" />
</span>
</div>
</form>
</body>
</html>
When i try to test a complete link like
aff.adr="http://xx.xx.xx.xx/directory/x.pdf" for example, the server return
this error : 'Invalid path for child request
"http://xx.xx.xx.xx/directory/x.pdf". A virtual path is expected. How can i
do to redirect to link in this control .
Thank's a lot.