Click here to Skip to main content
15,913,944 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi My friends
you are so professional , any question i ask , in maximum of 2 minutes i see the answer of that
thats great

how can i use the java class or function in my c# code???????
in other word can i use java syntax or class in .net or c#?????????????
if yes , how can i do this??????????
Posted
Updated 6-Jul-11 2:58am
v2
Comments
fjdiewornncalwe 6-Jul-11 10:02am    
You need to clean up your question. Do you mean "Java", or "Javascript". Either way, to get the best answers you need to fix either the tags or the question so that it is clear.
Sergey Alexandrovich Kryukov 6-Jul-11 12:22pm    
There is no such think as "Java script". Java is not a scripting language :-)
--SA

If i am not wrong, then you want to write java script from inside of .net platform instead of writing it from notepad or dreamweaver, or called Server Side Javascript.

If yes, then my solution is use string builder class of .net to write script and then use it client side.
 
Share this answer
 
You can build javascript from C# code with a stringBuilder and register it with
the function
this.Page.ClientScript.RegisterClientScriptBlock(...)


You can find documentation about it
here : Using JavaScript Along with ASP.NET 2.0[^]
and here : Client Callback with Validation Implementation Example[^]
 
Share this answer
 
Comments
Yuri Vital 6-Jul-11 9:51am    
After re-reading your question i think that I have misunderstood your question...

In fact you want to run javascript in CLR ?

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