Connecting Tech Pros Worldwide Forums | Help | Site Map

Text Box , word replace help DotNetBar

Newbie
 
Join Date: Oct 2009
Posts: 1
#1: Oct 12 '09
Hello, im new to this site and to C#. Right now im using DotNetBar. I am making a very basic and simple fun app. What is does is makes a pearl file and executes it. Well i have the code for the pearl file but it needs to be customized. For example in the pearl source it says YOURWEBSITEHERE.com Well is there a way for a user of my app to type in a text box there website and then it would go in the source for the pearl file and change YOURWEBSITEHERE.com to the website that was typed.

Can someone please explain in detail but simple so a newbie can understand how exactly to do this. Thanks again guys very much

Expert
 
Join Date: Jun 2008
Location: Pretoria, South Africa
Posts: 410
#2: Oct 15 '09

re: Text Box , word replace help DotNetBar


Hi,

Well what you can do is create a template file with placeholders. Your user will then enter the values they would like to be included in the file.
You then simply read the saved file, use the String.Replace() method and save the string as a file back to the disk.
Reply