更改asp .net网站中的文件夹 [英] changing folder in asp .net website
本文介绍了更改asp .net网站中的文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在下面的代码中,我想根据用户所做的选择更改<img src>
.
那是图像的文件夹位置.
src的照片/"部分(文件夹)需要更改为用户选择的任何内容
In the code below I want to change the <img src>
according to the selection the user makes.
That is the folder location of the images.
The "photos/" part(folder) of the src needs to change to whatever the user selects
<itemtemplate>
<a href="photosxml.aspx?photo=<%# Container.DataItem.Key %>">
target="_blank"><img src="photos/<%# Container.DataItem.Key %>.thm.jpg" border="0" /></a><br />
<font size="-1"><%# Container.DataItem.Value %></font>
</itemtemplate>
谢谢
柯布斯
img src标记需要更改为下拉列表的值.
Thanks
Kobus
The img src tag needs to change to the value of a drop down list.
推荐答案
为什么没有Case
语句来选择img src
? />
Why not have aCase
statement to select theimg src
?
<%
SELECT CASE Number
Case 1
<a href="photosxml1.aspx?photo=<%# Container.DataItem.Key %>" src="photos/ <%#Container.DataItem.Key%>.thm.jpg" border="0" /><br />
Case 2
<a href="photosxml2.aspx?photo=<%# Container.DataItem.Key %>">target="_blank" > <img src="photos/ <%#Container.DataItem.Key%>.thm.jpg" border="0" /></a><br />
END SELECT
%>
这篇关于更改asp .net网站中的文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文