Link to home
Avatar of Jyozeal
JyozealFlag for United States of America

asked on

display links from DB in asp.net

Hi All,

I have form where i am displaying 3 fields from DB. one of them is a link like http://placeholder.com
i am using below code in .aspx file.

<div class="col-xs-6" style="text-align:left;">
<asp:Hyperlink id="lnkPrivate" runat="server" navigateurl="http://sample.com" style='text-align:left;"></asp:HyperLink>
</div>

Open in new window

"

in the code-behind file aspx.cs file

lnkPrivate.navigateurl=dr["privatelink"].ToString() --dr is the datarow.

Open in new window


I do not see anything in the output. If i use asp:label instead of hyperlink i see the text but not as link. what am i doing wrong?

Thanks for your time.
ASKER CERTIFIED SOLUTION
Avatar of Paul MacDonald
Paul MacDonald
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of Jyozeal

ASKER

Thanks so much.
Happy to help!  Thanks for the points.