I have a method in javascript and a method in c#, now with a click on a button I would like to call them both.
First I would like to call the c# method named as 'Find_Direction' since it gets to inputs onclick and then I will call after the javascript method named as calcRoute.
I was trying this, but without any luck:
<asp:Button id="Button1" UseSubmitBehavior="False" value="GetDirections" onclick="calcRoute" OnClientClick="Find_Direction" runat="server"/>
The following error popped up :
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS1061: 'ASP.findroute_aspx' does not contain a definition for 'calcRoute' and no extension method 'calcRoute' accepting a first argument of type 'ASP.findroute_aspx' could be found (are you missing a using directive or an assembly reference?)