Click here to Skip to main content
15,919,613 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
There is any way at all to write a c# code from .js file?

Thank you
Posted
Comments
Sergey Alexandrovich Kryukov 6-Jun-11 13:21pm    
What does that mean, exactly?
--SA
Member 7966831 6-Jun-11 13:23pm    
To change session value when a java function happens
Member 7966831 6-Jun-11 13:31pm    
or to delete value from a table when it happens

You can't write C# from Javascript and have it be executed.

My god, could you imagine the HAVOC I could do if I could pass C# as a string and have it automatically execute?

However, you can certainly remove an object from Server-side session by creating a PageMethod or web-service that removes an object from session by it's string key.

Dave Ward @ Encosia talks about it extensively here.[^]


It's pretty darn easy nowadays, and gets easier as you do it (in fact, it's really a tad easier thank this if you're using MVC) and really warrants looking at for further use down the road for client-interaction.
 
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