Thread: Re: How to hyperlink an image within a TableCell
Re: How to hyperlink an image within a
TableCell
United States
2007-09-26 14:53:35
Thanks.
--- In AspNetAnyQuestionIsOk%40yahoogroups.com">AspNetAnyQuestionIsOkyahoogroups.com, "Dean Fiala"
<dfiala...> wrote:
>
> The rules are actually pretty loosey-goosey. All ASP.NET does at
the end of
> the process is push out HTML.
>
> Though one may inquire why you are building the table server side
in the
> first place (ie with the runat="server" tags). The only reason to
do so is
> if you need to add rows/columns dynamically and if that is the
case you
> might be better server looking to the repeater, datalist or grid.
>
>
> But back to your question. Either of these will work... >
> 1. If you don't need a dynamic table...
> <table>
> <tr>
> <td>
> <a href="http://someurl"><img src="image/colorlogo.jpg"
alt="our
> logo" /></a>
>
> > </td>
>
>
> </tr>
> </table>
>
> 2. If you do...
>
> <asp:Table runat="server" ID="SomeTable"> > <asp:TableRow runat="server" ID="SomeRow">
> <asp:TableCell ID="SomeCell">
> <a href="http://someurl"><img
> src="images/edition.jpg" alt="our logo" /></a>
> </asp:TableCell>
> </asp:TableRow>
> </asp:Table> >
> You only need to use asp:Image if you want to futz around with the
image
> server side. Otherwise just use the old img tag.
>
> On 9/26/07, ssolice <scott.solice...> wrote:
> >
> > Being (obviously) new to asp and having exhausted my search
efforts,
> > I must now suck it up and ask.
> >
> > I have this image, burried in a table cell on my login page. I
> > simply want to direct the user back 'home' when / if they click
on
> > the logo image. The rules apparently won't allow me to place the
> > obvious '<a href="http://.....com"> ../image_file </a>' into the
> > TableCell.
> >
> > Many thanks ahead of any help....
> >
> >
> > .
> > .
> > .
> > <asp:table id="table2" runat="server"> > > <asp:tablerow>
> > <asp:tablecell horizontalalign="Right"
verticalalign="top"
> > width="300" height="20">
> > <asp:image runat="server" id="image1"
> > imageurl="image/colorlogo.jpg"></asp:image>
> > </asp:tablecell>
> >
> > .
> > .
> > .
> >
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
>
>
> --
> Dean Fiala
> Very Practical Software, Inc
> Now with Blogging...
> http://www.vpsw.com/blogbaby
> Microsoft MVP
>
>
> [Non-text portions of this message have been removed]
>