无法访问代码背后的图像 [英] can't access image in code behind

查看:71
本文介绍了无法访问代码背后的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用数据列表,并且该图像列表下有一个图像控件.但是,如果我尝试访问.cs文件中的图像ID,则无法访问它.

请帮帮我

在此先感谢

解决方案

确定-这与您的其他问题有关.我想您对ASP.NET不太了解,您是否考虑过购买一本书并阅读它?

您的数据列表中有一个itemdatabound事件.在这种情况下,您可以连续找到控件.当您使用ID定义图像时,每行将有一个图像,因此您无法以常规代码访问该图像,因为它只是要创建的许多图像的模板. /blockquote>

I am using datalist and one image control is under the datalist. But if i try to access the image id in .cs file then it is not accessed.

Please help me

Thanks in advance

解决方案

OK - this relates to your other question. I guess you don''t know a lot about ASP.NET, have you considered buying a book and reading it ?

Your datalist has an itemdatabound event. In that event you can find the controls in a row. As you defined the image with an id, but you''ll have an image per row, you can''t access the image in your general code, as it''s only a template for many images that will be created.


这篇关于无法访问代码背后的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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