如何在asp.net的数据列表中获取HTML img控件的src值 [英] How to get the src value of an Html img control in a datalist in asp.net

查看:92
本文介绍了如何在asp.net的数据列表中获取HTML img控件的src值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

先生,

我有疑问,即如何获取放置在数据列表中的html图像控件的src值,并在单击它时激活图像的边框


关于
Meena

Sir,

I have doubt ie how to get the src value of an html image control placed inside a datalist and make border of the image active on its click


with regards
Meena

推荐答案

您必须将html图像设置为runat ="server"才能从代码隐藏中访问.然后,您必须在DataList中使用FindControl.
You must set the html image as runat="server" to reach from codebehind. Then you must use FindControl in DataList.


这篇关于如何在asp.net的数据列表中获取HTML img控件的src值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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