Click here to Skip to main content
15,894,405 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All, from anchor tag im calling a method on click event. below is my code,


ASP.NET
<a class=""  href="java<!-- no -->script:void(0);" runat="server" id="idSave" title="SAVE" >
				<span>
					<img class="" src="/_imgs/Tools/save_16.png" />
                
					<div class="" >SAVE</div>
				</span>
			</a>


Javascript Method is

JavaScript
function Save() {
					__doPostBack('idSave', '');
				}


From the above javascript method i needed to make a call to c# method, that method should not be static method.

Many thanks
Sanjeev
Posted
Comments
BillWoodruff 11-Nov-14 4:47am    
The C# method is on the server ? or ?
Sanjeev Alamuri 11-Nov-14 6:00am    
c# Method..

1 solution

 
Share this answer
 
Comments
Sanjeev Alamuri 11-Nov-14 6:01am    
PageMethods are static methods, in that methods, i cant get the UI elemets ID's
nrgjack 11-Nov-14 6:10am    
retrieve the ui elements id's with javascript and pass them to the static method

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