Hello,
I create a list with upload files (just .txt files),
blListDocs.Items.Clear();
string pn = Server.MapPath("../Uploads/Data");
string pathToWebAppRoot = Request.ApplicationPath;
string pathToFolder = "/Uploads/Data/";
string urlPath = pathToWebAppRoot + pathToFolder;
String[] fileList = Directory.GetFiles(pn);
for (int i = 0; i < fileList.Length - 1; i++)
{
ListItem li = new ListItem();
li.Text = Path.GetFileName(fileList[i]);
li.Value = urlPath + li.Text;
blListDocs.Items.Add(li);
}
Now, when I click one item link, the file's content is opening in another Web Page, but I'd like to read clicked file's content in control
<asp:TextBox ID="txtReadDocs" runat="server" TextMode="MultiLine" Rows="4"></asp:TextBox>
Thank You so much!!