Solved

On Hyperlink Click open aspx page from another website

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

863 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

27 Experts available now in Live!

Get 1:1 Help Now