Redirect to a link in a user control

M

Max

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.
 
N

NAÏMA

I have already used Response.redirect but the document opened itself into
another Page and not into the control.
Idon't know how to do...
 
N

NAÏMA

I have read that frames are not recommended with asp.net. I usually write
with frames in asp. I have already tested to do a document with frames
separated like left / right.
The left Frame contains in reality a treeview which is linked to a data base
but when i click onto a node of the link the result is displayed on the left
frame.
However, I wrote something like node.target="right" but that was not good.
the left frame was written in aspx language and the right only in html. Is
this comptatible or perhaps this is not advised ?
thank you very much for your assistance.
My excuses for the bad spoken language... Everybody is not shakespear !
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top