Re: Adding a Hyperlink control to a PlaceHolder
From: Ken Cox [Microsoft MVP] (BANSPAMken_cox_at_sympatico.ca)
Date: 10/24/04
- Next message: WALDO: "Re: Init Control when dropped on form??"
- Previous message: Mark Rae: "Adding a Hyperlink control to a PlaceHolder"
- In reply to: Mark Rae: "Adding a Hyperlink control to a PlaceHolder"
- Next in thread: Mark Rae: "Re: Adding a Hyperlink control to a PlaceHolder"
- Reply: Mark Rae: "Re: Adding a Hyperlink control to a PlaceHolder"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 23 Oct 2004 20:31:13 -0400
Hey Mark,
If link is showing in the source code but not being rendered properly by the
browser, I'd question whether the HTML is well formed.
Ken
"Mark Rae" <mark@mark-N-O-S-P-A-M-rae.co.uk> wrote in message
news:%23MQ1R6VuEHA.2972@TK2MSFTNGP10.phx.gbl...
> Hi,
>
> I have an <asp:PlaceHolder control on a page in an ASP.NET 1.1 app, as
> follows:
>
> <td nowrap><asp:PlaceHolder ID="phClientWebsite"
> Runat=server> </asp:PlaceHolder></td>
>
> Server-side, I'm running the following code:
>
> HyperLink lnkWebsite = new HyperLink();
> lnkWebsite.NavigateUrl = dr["strWebsite"].ToString();
> lnkWebsite.Target = "_blank";
> Page.FindControl("phClientWebsite").Controls.Add(lnkWebsite);
>
>
> However, the hyperlink is not displayed on the page, although it appears
> in the HTML when I do a View Source. Incidentally, if I copy the HTML from
> View Source into a stand-alone HTML page, the hyperlink is displayed.
>
> Incidentally, I've also tried this with an <asp:Label control, to no
> avail...
>
> What am I doing wrong?
>
> Any assistance gratefully received.
>
> Mark Rae
>
- Next message: WALDO: "Re: Init Control when dropped on form??"
- Previous message: Mark Rae: "Adding a Hyperlink control to a PlaceHolder"
- In reply to: Mark Rae: "Adding a Hyperlink control to a PlaceHolder"
- Next in thread: Mark Rae: "Re: Adding a Hyperlink control to a PlaceHolder"
- Reply: Mark Rae: "Re: Adding a Hyperlink control to a PlaceHolder"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|