Solved

On Hyperlink Click open aspx page from another website

Posted on 2006-07-11
4
308 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
  • 2
4 Comments
 
LVL 10

Accepted Solution

by:
aki4u earned 500 total points
Comment Utility
did you try:

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

Author Comment

by:Collindsouza
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now