Click here to Skip to main content
15,917,645 members
Please Sign up or sign in to vote.
5.00/5 (3 votes)
See more:
hi i put in page jquery gallery,a want when clicked on picture then run The method itself is implemented but i can't access to the current picture name and this just run the first picture method in server .
how access to current pic name in asp.net(server side) or send pic name by java to server
tnx
Posted
Comments
AshishChaudha 1-Mar-13 3:48am    
can't understand your question, please elaborate and show us what you have tried so far.
mosi98 1-Mar-13 3:55am    
i want access to jquery var in asp.net from server side

1 solution

Simple solution would be have an "asp hidden field" control in javascript bind that varaible value to that hidden field. thats it now you can get the hidden field value in server side. check the below sample code for setting the javascript variable to asp hidden field.

JavaScript
var hfObj = document.getElementById('<%=HiddenfieldId.ClientID%>');
hfObj.value = "the value you want to assign";


in server side like the usual way
C#
string someVar = HiddenfieldId.value;


Is this what you required?
 
Share this answer
 

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