gridview和数据列表中面临的问题 [英] Problem faced in gridview and datalist

查看:56
本文介绍了gridview和数据列表中面临的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HI,

我在面试中遇到了一个问题...........

那就是如何在gridview或datalist中设置图像大小..

问)设置图像的代码应该是固定的,它不应扩展到网页或所有大小都应相同的大小?
请给我这个问题的答案...



i have faced a question in interview...........

that is how to set a image size in gridview or datalist..

Q)what is the code for setting a image should be fixed it should not extend to webpage or all sizes should be in same size???
pls give me answer for this question...

推荐答案

You will always have the same width and Height image in the Gridview and datalist

<columns> 
<asp:templatefield xmlns:asp="#unknown">    
<itemtemplate>
<img src="images\<%Eval(" imagepath=")%>" height="200px" width="300px" />
</itemtemplate>
<asp:templatefield>
</asp:templatefield></asp:templatefield></columns>


这篇关于gridview和数据列表中面临的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆