0

I want to enable choosing which image to display after a button click.

Could you please give me an example?

Thanks

This is what I have so far :

protected void Button10_Click(object sender, EventArgs e)
  {
  Image1.ImageUrl = @"C:\img\Desert.jpg";
  Image1.ImageAlign = ImageAlign.Left;
 }

It won't display anything after I run it.

The images that I want to display are saved on my local disk C, so ImageUri probably doesn't work because of that.

Does anyone have an idea how to display an image in this situation?

Thanks*

3
Contributors
4
Replies
5
Views
5 Years
Discussion Span
Last Post by c#_fem
0

I have to use a web form, and there in no picture box available in web forms

string imgurl;

protected void Button10_Click(object sender, EventArgs e)
 {
 Image1.ImageUrl = imgurl;
 Image1.ImageAlign = ImageAlign.Left;
 }

So something like <image src=""...
is not an option for me

Edited by c#_fem

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.