• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 215
  • Last Modified:

how to change the text inside an textbox

hi i have tryed this and did not worked


textbox1.Text.Replace("#&ToEmail&#", "email@hotmail.com")

then i need to send this value to another string after change this text inside the text box.

like

dim vstr as string = textbox1.text.tostring()

any ideas?
0
rafaelrgl
Asked:
rafaelrgl
1 Solution
 
Bill NolanCommented:
Move it to the string first, and use the String class's Replace function.

dim s as string = textbox.Text;

s = s.Replace("old", "new");

Put it back in textbox if you want:

textbox.Text = s;
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now