.Net Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - More.Net Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 4th, 2003, 03:29 PM
pholiday pholiday is offline
Resident Moron
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Location: Tuscaloosa, AL
Posts: 26 pholiday User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to pholiday Send a message via AIM to pholiday
JScript or VBScript in my C# Program?

I've seen vague references in various books and things to being able to have a .NET Program use the JScript or VBScript interpreter to run their respective scripts.

I'm writing a program that I'd like to enhance by allowing the users to do a bit of scripting, but I've not found any good references on the subject, and the Microsoft.JScript namespace has a whole lot of stuff in it.

Anyone know if this is possible and, if so, where I can get more info on it?

-Pete
Comments on this post
JimmyGosling agrees!
__________________
Pete Holiday
"The most overlooked advantage to owning a
computer is that if they foul up, there's no law
against whacking them around a little."

More Quotes

Reply With Quote
  #2  
Old March 5th, 2003, 08:11 AM
Commodus2 Commodus2 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 2 Commodus2 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
The only thing i know about this is that you can regiter jscript scriptblocks and execute them on an event trigger

String script = @"<script language=""Javascript"">your jscript function foo(){alert('foo');}</script>";

Page.RegisterClientScriptBlock("name",script);

now you can add this script as an attribute on a button
btn.Attribute.Add("onClick","foo()");

now it will execute onclick.

i hope i did not tell you anything that you already knew.
if so, sorry.
else, hope it helped you

you can find more in the msdn lib
URL
Comments on this post
JimmyGosling agrees!

Reply With Quote
  #3  
Old March 5th, 2003, 08:19 AM
Commodus2 Commodus2 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 2 Commodus2 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
i forgot to add that this is only valid in a web app.

i don't think jscript works in winforms apps..

but then again... i'm no expert

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - More.Net Development > JScript or VBScript in my C# Program?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT