Re: Adding a Hyperlink control to a PlaceHolder

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Ken Cox [Microsoft MVP] (BANSPAMken_cox_at_sympatico.ca)
Date: 10/24/04


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>&nbsp;</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
>



Relevant Pages

  • Re: Massive HTML coding errors
    ... HTML Dom http://www.w3schools.com/htmldom/dom_reference.asp ' ... JUST BECAUSE YOU SAW SOME SOURCE CODE ... browser and click on "SOURCE". ... libraries might charge a small fee but most are free. ...
    (comp.infosystems.www.authoring.html)
  • Re: Zero Filling Integer
    ... > Are additional spaces somehow getting surpressed via the HTML? ... code would appear in the browser and it would be an almighty mess. ... If you look at the source code of the generated page you ... a table with the cell align property set eg: ...
    (comp.lang.php)
  • Re: What is the best way to resize an image?
    ... example by copying and pasting the HTML into a new HTML document, ... there is not hyperlink in the code you posted, remember that the image in my ... another alternative to showing the image in the same browser instance ... >> Kevin Spencer ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Problem with ASP.NET website. Does not display anything but a
    ... between getting a blank page and having no HTML sent to the client. ... Also, HTML errors NEVER produce error messages in a browser, so I would ... view the source code of that page in the browser. ... I am working on a website and suddenly this afternoon i cannot view ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Create a hyperlink to a webpage
    ... strValueText = HTMLEscape; ... I tried to trick the Save As Web by putting html in the shape property, ... Visio programming info: ... What I need is http://www.webpage.com to be an HTML hyperlink, ...
    (microsoft.public.visio.general)