Calling JavaScript from C#

  • Thread starter Thread starter Jakub Gutkowski
  • Start date Start date
J

Jakub Gutkowski

Hi,

How can I call JavaScript from C#?

I've create a Window User Control, that I put on ASP.NET
site as Object tag. Now, while some function from my
control is being proceed I need to call a JavaScript
function that is on the site (same as my control).

Best Regards,
Jakub Gutkowski
 
You have a couple options here:
Registerstartupscript or
insert it into the stream
Response.write("<script>function blah blah blah

regards
 
Are you asking how to make server-side code interact with
client-side code? What exactly are you trying to do?
What you're asking is technically impossible, but there
may be achievable ways to reach the same result..

JER
 
I'm trying to make smth. like Java Applet. I read that Windows User Control
on the web site is running on client site, not like Web User Control which
is running in server mode.



I need to create a User Control which can be accessible from JavaScript, and
can call JavaScript from itself. In Java Applet there was a package
Netscape.JScript which contain a JSObject which can access JavaScript on
client site.



At now, I've got Windows User Control, which functions I can call from
JavaScript, but I don't have an idea how to call a JavaScript function from
my control.



Best Regards,

Jakub G.
 
Back
Top