Solved

On Hyperlink Click open aspx page from another website

Posted on 2006-07-11
4
315 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

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…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

707 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