Solved

On Hyperlink Click open aspx page from another website

Posted on 2006-07-11
4
314 Views
Last Modified: 2012-05-05
I have a repeater control in which i have created a hyperlink

<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl= <%# "Javascript:var w=window.open('Contact_Details.aspx?ContactID=" + DataBinder.Eval(Container,"DataItem.ContactID") + "&LocationID="+DataBinder.Eval(Container,"DataItem.LocationID")+"','','width=980,height=660,resizable=yes');" %>
 text=<%# DataBinder.Eval(Container, "DataItem.Surname")%>>
</asp:HyperLink>

in the Navigate URL property i have written a javascript function that opens a popup window called 'Contact_Details.aspx' from within the local project...

something like http://localhost/[local website]/Contact_Details.aspx

However.. what i really want is for the popup window to open the Contact_Details.aspx page from another website

something like http://localhost/[another website]/Contact_Details.aspx

How can i achieve this??

how can i pass this [another website] as part of the url ??

Thanks in Advance

0
Comment
Question by:Collindsouza
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 10

Accepted Solution

by:
aki4u earned 500 total points
ID: 17086609
did you try:

window.open('../[another website]/Contact_Details.aspx?.....
0
 
LVL 5

Author Comment

by:Collindsouza
ID: 17086646
bingo... That works!!!

one more question... How can i put this ../[another website]/ in a gloabl variable so that i can change this property one time.. rather than going into indivisual location and changing it ??
0
 
LVL 10

Expert Comment

by:aki4u
ID: 17086736
add a module to the project
declare the Variable as Public in the Module
set it in the application_start function of Global.asax
use it within your application
0
 
LVL 10

Expert Comment

by:orbulat
ID: 17087033
just a quick word, u can add key in web.config for holding global variable :-)

e.g.
.....
  <appSettings>
        <add key="key1" value="value1" />
....
....

get the key by this
ConfigurationSettings.AppSettings["key1"];
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question