Hello I'm very new to coding but I developed a tool which works for local use. My Boss wants me to put it on our website for customers. I figured out ClickOnce is a way to do this.
The .exe is reading a .csv file to find data for use:
public string FindSalesmenPhone(string userName)
{
List<string> resLines = new List<string>();
var lines = File.ReadLines(@"S:\data.csv");
foreach (var line in lines)
{
var res = line.Split(new char[] { ',' });
//id to search
if (res[7] == userName)
{
resLines.Add(res[10]);
}
}
//to get the output
foreach (var line in resLines)
{
return line;
}
MessageBox.Show("no phone found!");
return null;
}
My question is: How can I change this path and will the .csv-file still be accessible after I deployed the tool with ClickOnce.
List<string> resLines = new List<string>();
var lines = File.ReadLines(@"S:\Manuel\data.csv");
Can I simply change it to something like:
var lines = File.ReadLines(@"http://mywebsite.com/data.csv");
Sorry might be easy-pie for you guys but I really appreciate your help!