Click here to Skip to main content
15,886,422 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I designed a site running on ASP.net & C#. I want to put the sketch of some buildings to my website which I made with a Java applet. I do not know the way to connect these graphics (Sketch) with my site (the site is connected with database which is designed by SQL Server Management Studio Express). When the user logs onto the site he will find a sketch and he can modify it and in the database there is table about how many rooms and floors there are in the building. So when the user modifies the sketch in the java applet, the website must modify the database automatically. Any modification on the website must be modify the database.

Please help me!
How am I to to connect the Java applet with ASP.net and the database?

Thanks in advance!
Posted
Updated 18-Apr-11 3:21am
v2
Comments
Manfred Rudolf Bihy 19-Apr-11 18:52pm    
First: Don't post comments as solutions!
Second: Please see my updated solution for a better link.

1 solution

The key to your solution is called Java to Javascript communication. There is a great article here on CP which you'll find here: Java to JavaScript Communication[^].
Javascript can call into Java applet code and the Java applet code can invoke Javascript in your browswer. By utilizing Ajax technology this will allow for your applet to effectively communicate with your ASP.net website:

Java Applet --Call--> Javascript --Ajax--> ASP.net website

Ajax Callback --Ajax-> Javascript --Call--> Java applet

This just about describes a full round trip from your applet to your website and back again.

[Edit]
Please see also this website: http://www.raditha.com/java/javascript.php[^] it will provide you with samples on how to achieve exactly what you want.
[/Edit]

Best Regards,

-MRB
 
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