本文介绍了点击如何在ASP中导航的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我的桌名是'进步'。我有以下列:tx_id(int,not null),picturefile(image,null),website(varchar(60),null)。 我可以使用'在屏幕上显示图像' Handler'。 我可以使用图片下方显示的网站栏目中的详细信息进行导航。 现在,我的要求是我不希望网站名称为与图像一起出现。 我只想点击图片本身进行导航。 我的代码: < td style = width:77px; > < img src = Handler7.ashx?tx_id = <% #Eval( tx_id)。ToString()%> style = margin-left:1px;边距:1px的;高度:153px; width:132px / > < asp:HyperLink ID = HyperLink2 runat = server 字体大小 = 较小 NavigateUrl = <% #Eval( website)%> > <% #Eval( 网站)%> < / asp:HyperLink > < / td > 我的尝试: < img src =Handler7.ashx?tx_id =<%#Eval(tx_id)。ToString()%> style =margin-left:1px;边距:1px的;高度:153px; width:132px/> < asp:HyperLink ID =HyperLink2runat =server字体大小=小NavigateUrl =<%#Eval(网站)% >><%#Eval(网站)%> 解决方案 包裹图像周围的链接 < asp:HyperLink ID = HyperLink2 runat = server 字体大小 = small NavigateUrl =' <% #Eval( 网站)%> ' > < img src = Handler7。 ashx?tx_id = <% #Eval( tx_id )。ToString()%> style = margin-left:1px;边距:1px的;高度:153px; width:132px / > < / asp:HyperLink > My table name is 'progressive'. I have columns like: tx_id (int,not null),picturefile(image,null),website(varchar(60),null).I am able to show the image on the screen using 'Handler'.I am able to navigate using the details in column 'website' shown beneath the image.Now, my requirement is that I dont want the website name to appear alongwith the image.I just want to navigate using a click over the image itself.My code:<td style="width:77px;"><img src="Handler7.ashx?tx_id= <%#Eval("tx_id").ToString()%> " style=" margin-left:1px; margin-top:1px;height:153px; width:132px" /><asp:HyperLink ID="HyperLink2" runat="server" Font-Size="smaller" NavigateUrl=<%#Eval("website") %>> <%#Eval("website") %> </asp:HyperLink></td>What I have tried:<img src="Handler7.ashx?tx_id= <%#Eval("tx_id").ToString()%> " style=" margin-left:1px; margin-top:1px;height:153px; width:132px" /><asp:HyperLink ID="HyperLink2" runat="server" Font-Size="smaller" NavigateUrl=<%#Eval("website") %>> <%#Eval("website") %> 解决方案 Wrap the link around the image<asp:HyperLink ID="HyperLink2" runat="server" Font-Size="smaller" NavigateUrl='<%#Eval("website") %>'> <img src="Handler7.ashx?tx_id= <%#Eval("tx_id").ToString()%> " style=" margin-left:1px; margin-top:1px;height:153px; width:132px" /></asp:HyperLink> 这篇关于点击如何在ASP中导航的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!