473,322 Members | 1,718 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Redirect to a link in a user control

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.
Nov 19 '05 #1
4 2996
Use Response.Redirect, not Server.Execute.

-Brock
DevelopMentor
http://staff.develop.com/ballen
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.


Nov 19 '05 #2
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...

"Brock Allen" <ba****@NOSPAMdevelop.com> a écrit dans le message de news:
11***********************@msnews.microsoft.com...
Use Response.Redirect, not Server.Execute.

-Brock
DevelopMentor
http://staff.develop.com/ballen
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.


Nov 19 '05 #3
But you're trying to emit a PDF -- this will require a seperate HTTP request
to get that document. Perhaps what you really want are frames?

-Brock
DevelopMentor
http://staff.develop.com/ballen
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...
"Brock Allen" <ba****@NOSPAMdevelop.com> a écrit dans le message de
news: 11***********************@msnews.microsoft.com...
Use Response.Redirect, not Server.Execute.

-Brock
DevelopMentor
http://staff.develop.com/ballen
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.


Nov 19 '05 #4
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 !

"Brock Allen" <ba****@NOSPAMdevelop.com> a écrit dans le message de news:
11***********************@msnews.microsoft.com...
But you're trying to emit a PDF -- this will require a seperate HTTP
request to get that document. Perhaps what you really want are frames?

-Brock
DevelopMentor
http://staff.develop.com/ballen
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...
"Brock Allen" <ba****@NOSPAMdevelop.com> a écrit dans le message de
news: 11***********************@msnews.microsoft.com...
Use Response.Redirect, not Server.Execute.

-Brock
DevelopMentor
http://staff.develop.com/ballen
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.


Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Damo | last post by:
Could someone please help me. I am a newbie at PHP. I downloaded formail.php Version 5.0 from Jacks scripts( http://www.dtheatre.com/scripts/ )and changed the required areas to my email address and...
3
by: Peter Bassett | last post by:
I have a recruiter website listing jobs. Some postings having email links directly to the employer (instead of the usual email link to the recruiter owner). The owner wishes to track when people...
3
by: Tom | last post by:
Hi, I have an index.aspx page which includes top.aspx, left.aspx, main.aspx and bottom.aspx. In the left.aspx, there is a login web control - login.ascx. It keeps session of username and role...
8
by: msnews.microsoft.com | last post by:
I want to redirect the user to a url outside of our website but I want it to preserve our application's window by opening a new window. We have a datagrid that has five hyperlink columns containing...
4
by: Marty U. | last post by:
I have a Session variable I need to check the value of. If it is value a then redirect to some page. I need to implement this in a user control that is on all the relevent pages. I placed the if...
1
by: Andre Ranieri | last post by:
I have a quick question - I'd just like to have confirmation to be sure. I'm building an ASP.NET corporate site for my employer, some of the pages have e-commerce capability and will need to be...
5
by: Trisha | last post by:
I have a navigation user control navig.ascx that redirects to respective pages based on webcontrols.linkbutton clicks using response.redirect. I would like to control the look and feel of those...
9
by: M | last post by:
Hello all, We've got the following problem: When a visitor klicks a dead link he ends up on a 404-page like should be. On that page there's an opportunity to mail the webmaster (me) about the...
10
by: Eirik Eldorsen | last post by:
How can I 301 redirect www.example.com/default.aspx to www.example.com without using ISAPI filters?
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.