Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
C# 2008 aka C# 3.0 Discuss the Visual C# 2008 (aka C# 3.0) language
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2008 aka C# 3.0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old September 11th, 2008, 04:34 AM
Authorized User
 
Join Date: Aug 2008
Location: , , .
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Default C# functions

How do I call a C# function in javascript?

  #2 (permalink)  
Old September 11th, 2008, 07:57 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Perhaps you'd like to elaborate on what you are doing so we have more to go on.

-Peter
compiledthoughts.com
  #3 (permalink)  
Old September 11th, 2008, 08:06 AM
samjudson's Avatar
Friend of Wrox
Points: 8,687, Level: 40
Points: 8,687, Level: 40 Points: 8,687, Level: 40 Points: 8,687, Level: 40
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2007
Location: Newcastle, , United Kingdom.
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

The specific of in what environment you are running the JavaScript and where the C# function is located would be of assistance.

In a general case you can often (provided you are running JavaScript in a Microsoft environment, e.g. IE) create instances of COM objects (using the new ActiveXObject() command), and you can also expose your C# applications to COM (using COM interop).

http://www.webreference.com/js/column55/activex.html

/- Sam Judson : Wrox Technical Editor -/
  #4 (permalink)  
Old September 11th, 2008, 05:10 PM
Friend of Wrox
 
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

I answered this one before:
http://p2p.wrox.com/topic.asp?TOPIC_ID=73936

If you look at his other posts, you find he is trying to pan an image and then capture the panned-to position. He wants then send that position back to the server so that he can get a zoomed-into image at that same pan position.

It's actually all pretty straightforward, but he is trying to learn three different technologies all at once, it seems, and gets the "how to" confused.


Similar Threads
Thread Thread Starter Forum Replies Last Post
C functions...??? ethantinder C# 2 April 25th, 2008 02:25 AM
Functions LTello BOOK: Professional JavaScript for Web Developers ISBN: 978-0-7645-7908-0 3 September 15th, 2006 11:15 AM
functions xelepi PHP How-To 1 March 10th, 2006 02:59 AM
Functions Meg Intro Programming 1 January 23rd, 2006 01:03 PM
Help with Functions megabytes C# 1 August 7th, 2003 12:48 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.