nobitavn94 Posted December 28, 2006 Share Posted December 28, 2006 Hi all,At runtime,I want to change image of image control when an event occur (such as user click change image button ).Thank you so much ! Link to comment Share on other sites More sharing options...
jesh Posted December 28, 2006 Share Posted December 28, 2006 If you have this in your aspx code: <asp:Image ID="myImage" runat="server" AlternateText="My Image" ImageUrl="myImage.gif" /> Then you can change the ImageUrl in the codebehind with this: myImage.ImageUrl = "myNewImage.gif"; Remember, however, that this would require a round trip (postback) to the server. If you don't want to do a round trip, you'll have to use client-side code (e.g. javascript). Link to comment Share on other sites More sharing options...
nobitavn94 Posted December 29, 2006 Author Share Posted December 29, 2006 Thank you ! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now