c# - calling a server side function from javascript without using ajax -
I am trying to do the following:
function redirection contact (contactId) { Var enc = & lt;% = QueryStringModule.Encrypt ("cont =" + contactId)%>; Warning (ENC); //window.location = "Contact / AddEditContact.aspx"; } a query module Encrypt is a function inside a c # class , the page is saying an error: The name 'ContactId is not present in the current context < / Div>
You will not be able to pass your javascript variable ( contactId ) to the C # method, for example, Generate Generic Web Handler (.asx) and pass your contact ID through AJAX and return whatever you expect from your encrypt call. Receive / div>
Comments
Post a Comment