List Info

Thread: Re: How to hyperlink an image within a TableCell




Re: How to hyperlink an image within a TableCell
country flaguser name
United States
2007-09-26 14:53:35

Thanks.

--- In AspNetAnyQuestionIsOk%40yahoogroups.com">AspNetAnyQuestionIsOkyahoogroups.com, "Dean Fiala";
<dfiala...> wrote:
&gt;
> The rules are actually pretty loosey-goosey. All ASP.NET does at
the end of
> the process is push out HTML.
&gt;
> Though one may inquire why you are building the table server side
in the
> first place (ie with the runat=&quot;server&quot; 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.
&gt;
>
> But back to your question. Either of these will work...
>
> 1. If you don't need a dynamic table...
> <table&gt;
> <tr>
> <td>
> <a href=";http://someurl"><img src="image/colorlogo.jpg&quot;
alt=&quot;our
&gt; logo" /></a>
>;
> > </td>;
>
>
> </tr>;
> </table>
>
> 2. If you do...
&gt;
> <asp:Table runat=&quot;server&quot; ID="SomeTable&quot;>
> <asp:TableRow runat=&quot;server&quot; ID="SomeRow";>
&gt; <asp:TableCell ID="SomeCell&quot;>
&gt; <a href=";http://someurl"><img
> src="images/edition.jpg&quot; 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:
&gt; >
>; > 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
&gt; > the logo image. The rules apparently won't allow me to place the
> > obvious '<a href=";http://.....com&quot;> ../image_file </a>' into the
> > TableCell.
> >
>; > Many thanks ahead of any help....
> >
>; >
>; > .
> > .
> > .
> > <asp:table id="table2" runat=&quot;server&quot;>
> > <asp:tablerow>
> > <asp:tablecell horizontalalign=&quot;Right&quot;
verticalalign=&quot;top";
> > width=&quot;300" height=&quot;20">
> > <asp:image runat=&quot;server&quot; id="image1"
> > imageurl=&quot;image/colorlogo.jpg"&gt;</asp:image>
> > </asp:tablecell>;
> >
>; > .
> > .
> > .
> >
>; >
>; >
>; >
>; > Yahoo! Groups Links
&gt; >
>; >
>; >
>; >
>;
>
> --
> Dean Fiala
&gt; Very Practical Software, Inc
> Now with Blogging...
> http://www.vpsw.com/blogbaby
> Microsoft MVP
>
>
> [Non-text portions of this message have been removed]
>

__._,_.___
.

__,_._,___
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )