473,395 Members | 1,726 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Substitute For Microsoft Script Control

I am using the Microsoft Script Control on a VB.Net winforms form, and I use
it to evaluate text based calculations that come from a database. For
example, it evaluates "1+1" or "True And False Or True". It does that with
code that looks like the following:

If myForm.fScriptControl.ScriptControl1.Eval("1+1") = 2 Then Return True

I now need this type of functionality to be used in web services, and I
cannot figure out how to use this script control separate from placing it on
a form. I cannot call a form with web services. Should there be a way to use
this scripting directly?

Derek
Jul 7 '08 #1
3 3094
what about a class in vb.net that do the job?????????
"Derek Hart" <de********@yahoo.comwrote in message
news:#b**************@TK2MSFTNGP04.phx.gbl...
I am using the Microsoft Script Control on a VB.Net winforms form, and I
use it to evaluate text based calculations that come from a database. For
example, it evaluates "1+1" or "True And False Or True". It does that with
code that looks like the following:

If myForm.fScriptControl.ScriptControl1.Eval("1+1") = 2 Then Return True

I now need this type of functionality to be used in web services, and I
cannot figure out how to use this script control separate from placing it
on a form. I cannot call a form with web services. Should there be a way
to use this scripting directly?

Derek
Jul 8 '08 #2
it is here as an attachment

use :

Dim calc As New mcCalc()

txtAnswer.Text = calc.evaluate(txtExpression.Text)
"Derek Hart" <de********@yahoo.comwrote in message
news:#b**************@TK2MSFTNGP04.phx.gbl...
I am using the Microsoft Script Control on a VB.Net winforms form, and I
use it to evaluate text based calculations that come from a database. For
example, it evaluates "1+1" or "True And False Or True". It does that with
code that looks like the following:

If myForm.fScriptControl.ScriptControl1.Eval("1+1") = 2 Then Return True

I now need this type of functionality to be used in web services, and I
cannot figure out how to use this script control separate from placing it
on a form. I cannot call a form with web services. Should there be a way
to use this scripting directly?

Derek
Jul 8 '08 #3
What namespace is this in?
"Gillard" <gi*************@hotmail.comwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
it is here as an attachment

use :

Dim calc As New mcCalc()

txtAnswer.Text = calc.evaluate(txtExpression.Text)
"Derek Hart" <de********@yahoo.comwrote in message
news:#b**************@TK2MSFTNGP04.phx.gbl...
>I am using the Microsoft Script Control on a VB.Net winforms form, and I
use it to evaluate text based calculations that come from a database. For
example, it evaluates "1+1" or "True And False Or True". It does that
with
code that looks like the following:

If myForm.fScriptControl.ScriptControl1.Eval("1+1") = 2 Then Return True

I now need this type of functionality to be used in web services, and I
cannot figure out how to use this script control separate from placing it
on a form. I cannot call a form with web services. Should there be a way
to use this scripting directly?

Derek

Jul 8 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: John H. | last post by:
I installed the Microsoft Script Debugger and set the "Enable Script Debug" flag on in IIS. Also, I made sure that the "Disable Script Debug" flag was off in Internet Explorer. Everything ran...
2
by: Jeff Marcum | last post by:
I need to write a query in Access that returns the results of a text field with the spaces replaced with underscores. So, if the data in the field was 'hello world', the query results would show...
5
by: Markus Wildgruber | last post by:
Hi! Is there a substitute in the .NET Framework for the GetKeyState(...) function? I want to check whether the shift key is pressed. What's the best way to do this? Do I have to use...
4
by: TC | last post by:
Hey All, Just wondering if there is a .Net substitute to the following Win32 APIs: IsCharAlphaNumeric IsCharAlphaA Regards,
2
by: Harry Simpson | last post by:
My boss is an ol' Microsoft Script Control 1.0 script guru. So when we needed to calculate fees he wanted to use the Script Control interopted to feed in a script (VBS) along with "objects" and then...
5
by: Steve Richter | last post by:
I have a public variable ( "mZipServiceUrl" ) in my code behind class that I am able to substitute into the HTML of the .aspx file: <span onclick="WindowOpen('<%=mZipServiceUrl%>')"...
2
by: malice | last post by:
I have been searching the internet for 12+ hours on how to do this. At this point I'm about to give up. I am using VB .Net 2.0 with the enterprise library jan 2006 release. This is my first time...
1
by: Rocky Zhou | last post by:
I am accustomed to vi my pthon scripts with 'tab' indent. But when I copy some code to my script, the indent may be 'spaces'. So I wanna a way to substitute those 'spaces' to be 'tabs'...
1
by: prabhuene | last post by:
Hi, i am new to using microsoft script control. I am trying a execute a code in a text file for example Private function test1() result1 = temperature(100+200)
3
by: Derek Hart | last post by:
I am using the Microsoft Script Control on a VB.Net winforms form, and I use it to evaluate text based calculations that come from a database. For example, it evaluates "1+1" or "True And False Or...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.