Hello Friends,
I have written data in a text file at a fixed location. But I want to know how to define dynamic location. The filename should be declared in the textbox earlier. Filename defines in form using a text field. Same thing I had written in the below code.
I want to know only how to define a dynamic location, don't want a static location.
private static StreamWriter WriteData;
WriteData = new StreamWriter(@"C:\Users\user\Desktop\ReportTmplate\" + txtTemplateName.Text+ ".txt"); WriteData.WriteLine(txtHeaderName.Text );
WriteData.WriteLine(txtEquipmentName.Text);

Shweta LodhaRank #31 · 39.8K reputationPosted Jul 16, 2021, 11:06 AM EDT
Ravinder SharmaRank #1,211 · 1.5K reputationPosted Jul 18, 2021, 8:52 PM EDT