473,385 Members | 1,326 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,385 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 1065
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.