|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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
__________________
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 |
|
#2
|
|||
|
|||
|
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 |
|
#3
|
|||
|
|||
|
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 |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > .Net Development > JScript or VBScript in my C# Program? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|