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

Passing a Variable into an eval() statement

CES
All,
I was wondering is their a way of passing a variable into an eval()
statement? I've created a custom eval() dll to use with my VB.net code.
Every thing works fine until I try to pass a variable into the text string .
In the code below I'm trying to pass the variable zz into txtFS which comes
from the file file.txt. Any suggestions on how to get this to work would be
appreciated.
CES
dim _file As String = "file.txt"
dim myFileStream As New FileStream(includesPath &
_file,FileMode.Open,FileAccess.Read)
dim sr As StreamReader = new StreamReader(myFileStream)
dim txtFS As String = sr.ReadToEnd()
dim x As New jsEval()
dim zz As String = "This is the text I want to pass into the..."
txtFS = x.eval(txtFS)

-----------------file.txt-----------------------------
var now = new Date();

var footer = zz + "<p class=\"footer\">Copyright © " + now.getYear() + " -
All rights reserved.<br />";
footer = footer + "Use of this site signifies the users complete agreement
to all terms,<br />";
footer = footer + "as described within the Terms of Use page ( Updated
10/10/2003 ).</p>";
Nov 21 '05 #1
0 1178

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

Similar topics

11
by: Mark | last post by:
hello! I have a class method that takes a variable number of parameters and correctly deals with them with func_get_args, etc ... i.e. class ABC { public function MooSaysTheCow()
2
by: John Aspinall | last post by:
Hi, Ive got a navigation bar for my web pages in an include (top_nav.asp). On my homepage (index.asp) and all the other site pages I have a reference to this include which includes my...
0
by: GG | last post by:
I 'm struggling with this for a while now and no matter what I do I cannot get it to work. Here's more or less what 's going on: I'm creating Datagrids at runtime, and they contain a...
9
by: Max | last post by:
I'm new with Javascript and can't seem to figure out what I'm doing wrong here as I'm not able to pass a simple variable to a function. In the head of doc I have: <script...
2
by: MX1 | last post by:
HELP! I have a query that gets a few values from a form. The problem I'm having is a date field in the query. When I put the value in the criteria, it works fine. When I put the same value as...
3
by: Mike | last post by:
I have a if then statement in a form calling a public sub in a module, that section works fine, but affter doing calculations I want to pass the variable back the the form. How can I go by doing...
3
by: Wayne Wengert | last post by:
I am trying to impliment the extensions to the Club Starter kit as described at: http://msdn.microsoft.com/asp.net/default.aspx?pull=/library/en-us/dnaspp/html/extendclubwebsitesk.asp but when I...
5
by: glenn | last post by:
Hi folks, The problem I have is that a query string works if hard-coded but if I pass a variable to it, it does not work as shown here. This works: querystring="SELECT * FROM USERS WHERE...
9
by: d4zza | last post by:
I'm using Access 97 SR-2 on Windows XP to develop an Inventory style database that has some functionality, but having a problem making my query dynamic. I have a switchboard style form which I...
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
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.