Variable replace in text

  • Thread starter Thread starter Todd Lu
  • Start date Start date
T

Todd Lu

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
 
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);
 
Thanks for the response. I was making it too hard on myself. I just use
the replace function and all is well.

Thanks,

Todd
 
Back
Top