Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / May 2008

Tip: Looking for answers? Try searching our database.

Hyperlink\HTML Table

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
gh - 30 May 2008 13:34 GMT
I have a HTML table that I have labels in several cells and I populate
them in the Page Load event, from a dataset.  I have a hyperlink in one
cell that I want to display a website address in.  I tried the markup
below but it doesn' t work.  The cell is blank.

  <tr>
                <td>
                    &nbsp;</td>
                <td>
                    <asp:HyperLink ID="lblWebsite" runat="server"
                    NavigateUrl='<%# DataBinder.Eval(Container,
"DataItem.WEBSITEADDRESS") %>'
                    ImageUrl=''
                    Text='<%# Eval("WEBSITEADDRESS") %>'></asp:HyperLink>
                </td>
                <td>
                    &nbsp;</td>
            </tr>

If I use the following to populate the Hyperlink, it displays the
website address ok, but it is not a link.  How do I do this?

lblWebsite.Text = ds.Tables[0].Rows[0]["WEBSITEADDRESS"].ToString();

Thanks
Waldy - 30 May 2008 14:48 GMT
> If I use the following to populate the Hyperlink, it displays the website
> address ok, but it is not a link.  How do I do this?
>
> lblWebsite.Text = ds.Tables[0].Rows[0]["WEBSITEADDRESS"].ToString();

It will not be shown as a link if the NavigateUrl property is blank.
Munna - 30 May 2008 15:06 GMT
> I have a HTML table that I have labels in several cells and I populate
> them in the Page Load event, from a dataset.  I have a hyperlink in one
[quoted text clipped - 21 lines]
>
> Thanks

Hi

Did you also tried to set up the navigate url of lblWebsite in item
databound?

Thanks

Munna

www.munna.shatkotha.com

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.