What I want to do is have my onclick perform Back end actions since I am working with asp.
.aspx code:
<asp:UpdatePanel ID="panelToma" runat="server" class="botonToma">
<ContentTemplate>
<asp:Button ID="btnOk_T" runat="server" Text="<%$ Resources:GlobalAdmin, Save %>" CssClass="btn btn-primary btn-width100" OnClick="rutaImg" OnClientClick="obtenerRuta();" />
</ContentTemplate>
Code .cs
public void rutaImg(object sender, EventArgs e)
{
string ruta = ((TextBox)TomaEvidencia.FindControl("ocultarField")).Text;
Console.WriteLine(ruta);
}
The problem is that when I want to load the page I get the following:
Compiler Error Message: CS1061: 'tomaevidencia_aspx' does not contain a definition for 'rutaImg' and no extension method 'rutaImg' accepting a first argument of type 'tomaevidencia_aspx' could be found (are you missing a using directive or an assembly reference?)
The point is that if I have defined the method in my class of c #
Note: I already cleaned the project, deleted coockies (although I had nothing to do) and re compile the project to see if there was anything that affected it.
PS: I copied the .cs code from another page, I hope that has not interfered with the process.