Click here to Skip to main content
15,898,371 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear all,

i am facing a problem to call a encryption method that is placed in business layer class and i have to call this method in java script function. java script function is used to open rad window with query string parameter and server side function will provide us the parameter value which to be pass for page that would open in rad window so please help me as soon as possible........thanks
Posted
Updated 7-Jan-13 23:34pm
v3
Comments
Richard MacCutchan 4-Jan-13 5:33am    
You tagged this question "C++"; I have corrected it for you.
Sergey Alexandrovich Kryukov 4-Jan-13 8:14am    
Not clear. And there is not such thing as "java script" (Java is not a scripting language ;-)
—SA

I believe you are having a fundamental issue understanding what happens on what code is executed on the server and what code is executed on the client.
If you are attempting to encrypt something using javascript and you want to use server side code to achieve this, you are going to be sending the raw, unencrypted data over the internet back to your site to initiate the encryption. The way you would do this is using an ajax call to a WebMethod on your server which acts as a wrapper to the business layer object.
I would highly suggest that you DO NOT DO IT LIKE THIS! If you have sensitive information being passed from the page to the server then your better solution would be to implement SSL for that portion of the site.
 
Share this answer
 
Hi,

You can do one thing please call that business layer method before your javascript function call and put that in hiddenfield and after that use hiddenfield's value as the parameter value.

Thanks!
 
Share this answer
 
v2

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