JavaScript and .NET dll files

  • Thread starter Thread starter Roshawn Dawson
  • Start date Start date
R

Roshawn Dawson

Hi,

I was wondering if it were possible to call a .dll file created in .NET
from a Javascript function?

Thanks,
Roshawn
 
Roshawn,

This is not possible to call the DLL directly from Javascript as Javascript
is a client-side technology and the DLL resides on the server. You could
have Javascript post back to the page with some sort of variable in the
querystring or a hidden input and parse the postback in the code behind.

Ian Suttle
http://www.IanSuttle.com
http://www.NewsFuel.com - Aggregated Technology News
 
JS is not meant to execute anything that is not "client oriented". It is
there to "enhance" user experience with the wonderful internet browser.
Example: If I arrive at a website and I want to have that special
experience, then I would say, yes, please download this, say an "Activex
control", and I will risk myself to open it. However, I do not want to see
JS that executes a program behind the scene from somewhere else that I am
not aware of !

John
 
Thank you for your responses.

However, being a newbie ASP.NET programmer, I've done some reading in
the last couple of hours.

I've now learned of the uses of the <script> section of an ASP.NET page.
I understand that this section can become server-side code if marked
correctly (ie. runat="server").

Here's what I'm trying to do. Code in the <script> section would do a
particular operation. The results of that operation I'd like to use in
a JavaScript function.

Can this be done?

Thanks,
Roshawn
 
Thanks for the link.

If you all haven't noticed, there's a lot of talk on the web regarding
Google Suggest.


Wow very cool - I think a lot more sites are going to implement this
provided there is a good way to handle multi-browser support as well as the
database load.

In addition to the Javascript script remoting link I sent you, you could
also check out Dart's Live Controls. Dart Live Controls is a set of
prepackaged controls allowing dynamic client side callbacks in ASP.NET 1.1
Or I guess you could wait for ASP.NET 2.0 with it's built in IE only Client
Side Callbacks.

I'm already using the Thycotic remoting interface for a project of mine and
it works quite well and has a great price too : )
 
Back
Top