Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using an asp Image control in an web page. (Here i have not set any ImageURL path)

Now I am setting a ImageURL through src property in Jquery in client side.

Now On click of a butoon I have to access this ImageURL but the ImageURL is always empty.

Can anyone tell how to access this ImageURL in server side if I change the src value in client side
Posted
Comments
Joseph M. Morgan 26-Feb-14 11:21am    
Please post the code you are using to change the src. Also, are you using Webforms, Razor, etc?

1 solution

You can't.

The server will not get back the HTML you modified on the client side. If the client has data to send back to the server it has to either put this data into a Form to be posted back or has to call an Ajax method on the server and send some modified data back.
 
Share this answer
 
Comments
Prasaad SJ 26-Feb-14 22:22pm    
Yeah.. I later found out that the HTML input tag alone will be posted back to the server. Images will only be rendered. So here I assigned the image src in a hidden control and then I use the that in the server.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900