1

i have nearly 100 image buttons in a page, which calls a common function

protected void img_clock(object sender,ImageClickEventArgs e)

(which is in c#)

how can i set a common image using ImageUrl property of ImageButton to the image button which called this function or which is clicked.

1 Answer 1

2

You can cast sender back to ImageButton and inspect it's ImageUrl value to retrieve image from the button that was clicked.

Sign up to request clarification or add additional context in comments.

1 Comment

protected void img_Click(object sender, ImageClickEventArgs e) { var url = ((ImageButton)sender).ImageUrl; foreach (var img in YourImages) img.ImageUrl = url;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.