如何将gridview中的员工ID与图像文件夹员工ID进行比较 [英] how to compare employee id in gridview to image folder employee id

查看:72
本文介绍了如何将gridview中的员工ID与图像文件夹员工ID进行比较的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在E文件夹中,所有教师图像都存储有每个员工ID的名称。



在E文件夹中的图像列表如下





1(1是员工ID是每个教职员的形象名称)

2(2是员工ID是图像每个学院的名字)





在Gridview中如下





教师姓名学院ID图像



Ramesh 1 Ramesh图片(Ramesh员工ID为1)

Suresh 2 Suresh image(sruesh员工ID为2)





i希望将相应的员工ID图像从文件夹绑定到gridview。





我怎样才能在asp.net中使用c#。



谢谢

问候,

narasiman P

解决方案

在数据库表的图像字段中存储全名的路径喜欢



e:/foldername/1.jpg



add itemtemplate在gridview中代替imageurl属性写



 ImageUrl ='<% #Eval( 图像)%>'


In E Folder all faculty images are stored with the name of each employee id.

In E folder list of images as follows


1 ( 1 is the employee id is the image name for each faculty)
2 ( 2 is the employee id is the image name for each faculty)


In Gridview as follows


Faculty Name Faculty ID Images

Ramesh 1 Ramesh image (Ramesh employee id is 1)
Suresh 2 Suresh image (sruesh employee id is 2)


i want to bind corresponding employee id image from folder to gridview.


for that how can i do in asp.net using c#.

thanks
regards,
narasiman P

解决方案

store path with full name in image field of database table like

e:/foldername/1.jpg

add itemtemplate in gridview and in place of imageurl property write

ImageUrl='<%#Eval("Image")%>'


这篇关于如何将gridview中的员工ID与图像文件夹员工ID进行比较的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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