Hello,
I need to create the following string at runtime to add to my page:
"
<script type="text/javascript"><!--
client = "3894758346587";
width = 800;
height = 600;
format = "image";
FirstWord; SecondWord
name = "1213131+6456456";
//-->
</script>
"
The values client, width, height, format, FirstWord, SecondWord, name
are taken from properties with the same name: Me.Client, Me.Width, ...
What is the best way to build this string.
Note that if, for example, Me.Client is empty then the code line
'client="3894758346587";' should not be added.
Thanks,
Thanks 2 1173
shapper wrote:
Hello,
I need to create the following string at runtime to add to my page:
"
<script type="text/javascript"><!--
client = "3894758346587";
width = 800;
height = 600;
format = "image";
FirstWord; SecondWord
name = "1213131+6456456";
//-->
</script>
"
The values client, width, height, format, FirstWord, SecondWord, name
are taken from properties with the same name: Me.Client, Me.Width, ...
What is the best way to build this string.
Note that if, for example, Me.Client is empty then the code line
'client="3894758346587";' should not be added.
Thanks,
Thanks
Use a StringBuilder to create the string, then the
ClientScript.RegisterStartupScript method to add it to the page.
You can make the RegisterStartupScript method add the script tag, so
don't put that in the string, just the Javascript code.
--
Göran Andersson
_____ http://www.guffa.com
you could get more object oriented and use a JSON serializer.
-- bruce
shapper wrote:
Hello,
I need to create the following string at runtime to add to my page:
"
<script type="text/javascript"><!--
client = "3894758346587";
width = 800;
height = 600;
format = "image";
FirstWord; SecondWord
name = "1213131+6456456";
//-->
</script>
"
The values client, width, height, format, FirstWord, SecondWord, name
are taken from properties with the same name: Me.Client, Me.Width, ...
What is the best way to build this string.
Note that if, for example, Me.Client is empty then the code line
'client="3894758346587";' should not be added.
Thanks,
Thanks This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: dog |
last post by:
I've seen plenty of articles on this topic but none of them have been
able to solve my problem.
I am working with an Access 97 database on an NT4.0 machine, which has
many Access reports.
I...
|
by: James Moore |
last post by:
I've got a datagrid. One of the elements in the grid is a comma-seperated
string. I'd like to split the string and create N linkbuttons, one for each
element of the string.
Creating the grid...
|
by: Dave Taylor |
last post by:
I have a DataTable with three string columns, "Value", "Format" and "Type"
However, some of the rows contain numbers and dates in the Value field. So
I would like to be able to format the output...
|
by: Federico |
last post by:
Hi I want to create a Web Services where I receive a Template DOT word
a file XML and with these I create a Document that a I'll Send as Dime
Attachment.
<WebMethod()> _
Public Function...
|
by: Michael Sperlle |
last post by:
Is it possible? Bestcrypt can supposedly be set up on linux, but it seems
to need changes to the kernel before it can be installed, and I have no
intention of going through whatever hell that would...
|
by: sandy |
last post by:
I need (okay, I want) to make a dynamic array of my class 'Directory',
within my class Directory (Can you already smell disaster?)
Each Directory can have subdirectories so I thought to put these...
|
by: max |
last post by:
Hello,
I am a newbye, and I'm trying to write a simple application.
I have five tables with three columns; all tables are identical; I need to
change some data in the first table and let VB...
|
by: etuncer |
last post by:
Hello All,
I have Access 2003, and am trying to build a database for my small
company. I want to be able to create a word document based on the data
entered through a form. the real question is...
|
by: Ispep |
last post by:
Hi, unfortunately having a bit of difficulty with a question from an Open University course I'm currently doing. If you could help me out in any way I'd be grafeul (though obviously it goes without...
|
by: Vlad |
last post by:
I am having problems using the file.create method within a function
that is called when looping through an array of filepaths.
If I call my function with a hardcoded file path --C:\Temp.txt the...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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,...
|
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...
|
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...
|
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: 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,...
| |