嗨我在图像mapcontrol中得到一个错误.............. [英] hi iam getting a error in image mapcontrol..............

查看:50
本文介绍了嗨我在图像mapcontrol中得到一个错误..............的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hiiiiiiiiiii





hiiiiiiiiiii


protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
      {
          if (Button1.Text == "ON")
          {
              Image.ImageUrl = "C:\\Avail.Prg";
              Button1.Text = "OFF";
          }
          else
          {
              Image4.ImageUrl = "C:\\Not avail>Prog";
              Button1.Text = "ON";
          }

推荐答案

图像是控件类型。



所以你不能分配它像



Image is a Control Type .

So you cant assign to it like

Image.ImageUrl = "C:\\Avail.Prg";





使用ID创建一个Image控件,如下所示



类似





Create a Image control with the ID and do like below

Something like

<asp:ImageMap ID="ImageMap1" runat="server"></asp:ImageMap>//Markup





和代码背后





And in Code Behind

Image1.ImageUrl = "C:\\Avail.Prg";// Image1 stands for ID


这篇关于嗨我在图像mapcontrol中得到一个错误..............的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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