Solved

On Hyperlink Click open aspx page from another website

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

Independent Software Vendors: 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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

756 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