473,399 Members | 2,774 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,399 software developers and data experts.

Passing variables from C# to vbscript

Can someone help me in passing a variable from c# to vbscript ?
Aug 8 '08 #1
3 2177
joedeene
583 512MB
you could try posting a little more information of what exactly your trying to do, or at least some more of the question. like how are you passing them ? networkly? or just through two apps on a local machine compiled by those two programming languages?
Aug 8 '08 #2
I just want to pass variables between two application on the local machine...For instance , I will put a value in a textbox in C# then pass that value to the vbscript.
Aug 9 '08 #3
joedeene
583 512MB
well, im not a real big VB coder, well not VB6 and earlier, but i have worked with VB 2005 and VB 2008, one simple way is to do a streamwriter and streamreader to the temp directory of the user, or just anywhere, since youre working with two different programmign languages. so like

(to write in VB 2008)
Expand|Select|Wrap|Line Numbers
  1.    Dim mystreamwriter As New IO.StreamWriter("mystreamtowritevariable")
  2.         mystreamwriter.Write("variable(s)/value(s)")
  3.         mystreamwriter.Flush()
  4.         mystreamwriter.Close()
and to read it in c sharp,(newer c sharp)

Expand|Select|Wrap|Line Numbers
  1. FileStream MyFileStream = new FileStream(@"c:\Projects\Testing.txt", FileMode.Open, FileAccess.Read, FileShare.None);
  2.       StreamReader MyStreamReader2 = new StreamReader(MyFileStream);
  3. //write any code to read the data into a variable for that form
  4.       MyFileStream.Close();
  5.       MyStreamReader2.Close();
*now using this might use lots of resources and require file io permissions, if not in a 'permitted' directory, and not tested. but should work
Aug 9 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Jonas Daunoravicius | last post by:
The subject pretty much sums up what I need to do. Here is what I have so far, but still can't figure out how to get it working: <script language="javascript" type="text/javascript"> function...
3
by: t-ball | last post by:
I am new to the world of ASP, and at the same time VBscript (also a firt time poster). I am currently creating a multiple page form where the information on the first page needs to be validated....
4
by: A Web Master | last post by:
I am designing a site for a client where I have a frameset and 3 frames (all in ASP). I am creating session variables in the frameset that need to be accessed in the frames. It seams that in...
3
by: AndyDunning | last post by:
Hello, I'm interested in establishing the best way to pass information between a vb script and a .net application. We have a VbScript that runs on a users pc every time a phone call is routed...
5
by: Jack | last post by:
Hi, I need to pass multple variables in a link in order to go to a asp page with the two varables. The following are the values of the variables using response.write: <%'Response.Write Mypage...
0
by: thisis | last post by:
Hi All, I'm getting an error on my ASP page: Microsoft VBScript runtime error '800a000d' Type mismatch: 'StoreFileIntoField' I assume - 99.5% - the error is generated because of worng...
2
by: mao120846 | last post by:
I search for an asp vbscript page (residing on a windows web server) that pass a "path" variable to a php page on a different web server (php capable). The php script receive the "path" variable and...
12
by: ll | last post by:
Hi, I'm wondering about variable declaration in ASP - is there a good resource for this? In naming variables, is there a way to include characters in a variable name after the...
7
by: rmurgia | last post by:
When a variable is created using Javascript, should it then be able to be read immediately using embedded VB code or does the submit command have to be entered or are the variables between...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: 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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.