473,394 Members | 1,811 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,394 software developers and data experts.

Variable replace in text

I am trying to make a description in my ASP.NET form to be dynamic. I have
a maintenance form that a description may be entered. I would like to add
various sql table fields into the description so I can display the result on
another form with all the text and values embedded from the sql table.

I tried to add this text into the sql table and display it on a textbox but
I am having some problems.

ex: "Includes healthcare coverage from United Healthcare with a
<%=Plan3Contributions%>,<%=Plan2Contributions%> test."

I can enter the <%=Plan3Contributions%> variables in the form and get my
values but when I place the string into the <input.value> then i get the
following result:

ex: Includes healthcare coverage from United Healthcare with a , test.

What would be a good way to try to embed sql fields into a form dynamically
so I can give the user the flexibility to put whatever sql fields into the
text area of my maintenence screen?

Thanks

Todd
Nov 22 '05 #1
3 1311
pm
I am not quite sure what you are actually trying to do, but some

input.value = String.Format("Includes healthcare coverage from United
Healthcare with a {0}, {1} test.",Plan3Contributions, Plan2Contributions);
"Todd Lu" wrote:
I am trying to make a description in my ASP.NET form to be dynamic. I have
a maintenance form that a description may be entered. I would like to add
various sql table fields into the description so I can display the result on
another form with all the text and values embedded from the sql table.

I tried to add this text into the sql table and display it on a textbox but
I am having some problems.

ex: "Includes healthcare coverage from United Healthcare with a
<%=Plan3Contributions%>,<%=Plan2Contributions%> test."

I can enter the <%=Plan3Contributions%> variables in the form and get my
values but when I place the string into the <input.value> then i get the
following result:

ex: Includes healthcare coverage from United Healthcare with a , test.

What would be a good way to try to embed sql fields into a form dynamically
so I can give the user the flexibility to put whatever sql fields into the
text area of my maintenence screen?

Thanks

Todd

Nov 22 '05 #2
pm
why not use String.Format.

"Todd Lu" wrote:
I am trying to make a description in my ASP.NET form to be dynamic. I have
a maintenance form that a description may be entered. I would like to add
various sql table fields into the description so I can display the result on
another form with all the text and values embedded from the sql table.

I tried to add this text into the sql table and display it on a textbox but
I am having some problems.

ex: "Includes healthcare coverage from United Healthcare with a
<%=Plan3Contributions%>,<%=Plan2Contributions%> test."

I can enter the <%=Plan3Contributions%> variables in the form and get my
values but when I place the string into the <input.value> then i get the
following result:

ex: Includes healthcare coverage from United Healthcare with a , test.

What would be a good way to try to embed sql fields into a form dynamically
so I can give the user the flexibility to put whatever sql fields into the
text area of my maintenence screen?

Thanks

Todd

Nov 22 '05 #3
Thanks for the response. I was making it too hard on myself. I just use
the replace function and all is well.

Thanks,

Todd
"pm" <pm@discussions.microsoft.com> wrote in message
news:00**********************************@microsof t.com...
why not use String.Format.

"Todd Lu" wrote:
I am trying to make a description in my ASP.NET form to be dynamic. I have a maintenance form that a description may be entered. I would like to add various sql table fields into the description so I can display the result on another form with all the text and values embedded from the sql table.

I tried to add this text into the sql table and display it on a textbox but I am having some problems.

ex: "Includes healthcare coverage from United Healthcare with a
<%=Plan3Contributions%>,<%=Plan2Contributions%> test."

I can enter the <%=Plan3Contributions%> variables in the form and get my
values but when I place the string into the <input.value> then i get the
following result:

ex: Includes healthcare coverage from United Healthcare with a , test.

What would be a good way to try to embed sql fields into a form dynamically so I can give the user the flexibility to put whatever sql fields into the text area of my maintenence screen?

Thanks

Todd

Nov 22 '05 #4

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

Similar topics

6
by: BigDadyWeaver | last post by:
I am using the following code in asp to define a unique and unpredictable record ID in Access. <% 'GENERATE UNIQUE ID Function genguid() Dim Guid guid =...
18
by: Joe | last post by:
Hi, I am trying to alter the refresh rate of an online webpage in a webbrowser control using MFC. However the Timer ID is stored in a local variable and I don't know how to access it. Is there a...
2
by: Jordan Richard | last post by:
Put another way, is there any way I can tell ASP.NET to convert a path (imbedded in a string variable, "~/images/some_image.gif") to a root-relative path, that the client will understand, for the...
13
by: Nagib Abi Fadel | last post by:
Is it possible to create a session variable for each user in Postresql ?? Thx
1
by: stephane | last post by:
I have a problem which must be in this : print" <script type='text/javascript'> document.location.replace('http://127.0.0.1/add_task.php?req_id={$maxValue}&tk_request_name={$req_name}');...
14
by: aroraamit81 | last post by:
Hi, I am facing a trouble. I have some Session variables in my code and somehow my session variables are getting mixed up with other users. For example User A has access to 10 companies and...
6
by: Jody Gelowitz | last post by:
I have run into an issue with variable scope within an XSLT document that is translated in VS.NET 2.0. Under VS.NET 1.1 (XslTransform), this code works fine. However, when using VS.NET 2.0...
3
by: Markus Schuster | last post by:
Hi, I have the following javascript function: <script type="text/javascript"> function HTMLEncode( text ) { text = text.replace(/&/g, "&amp;") ; text = text.replace(/"/g, "&quot;") ;
2
by: X l e c t r i c | last post by:
Here: http://bigbangfodder.fileave.com/res/sandr.html I'm trying to use string.replace() for a basic search and replace form using textarea values as the regexp and replacement values for...
1
by: faultykid | last post by:
I would like to store a variable then call it back later. I have a variable on line 198 www = ''+this._ad.clickUrl+''; and on line 321 i try document.write(www);
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: 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: 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
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...
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
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...

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.