473,396 Members | 1,834 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,396 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 3002
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.