Click here to Skip to main content
15,896,063 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am trying to display some data in a popup here i am trying to display the url as a link but the url only gets diplayed as a string

C#
var link = new HyperLink() { NavigateUrl = "https://www.google.se", Text = "https://www.google.se" };

 ClientScript.RegisterStartupScript(this.GetType(), "Popup", "ShowPopup('"link.NavigateUrl"');", true);
Posted
Updated 20-Jan-15 4:15am
v2

1 solution

There are two things here.

1) You are creating object of HyperLink but not adding to your UI, so that element is never going to be display, so if you have your own Popup Window(Page) then add this element there where you need to display it as link.

2) this ShowPopup(), is it from a 3rd party Javascript library, if yes then mentioned about it and probably ask in that forum.

3) on a side note, your code is not working, anyway below code will also not work :(

C#
ClientScript.RegisterStartupScript(this.GetType(), "Popup", "ShowPopup('" + link.NavigateUrl + "');", true);


Thanks
Rushi
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900