I have developed an asp.net c# webpage to allow user to download or view server logs. Once the server and log date is selected they have the option to either open it via Notepad++, or view part of the log in a textbox. Part of the requirement is to show only the last 50 lines of the log in the textbox, this in the only part I'm not sure of can anyone point me in the right direction?
Just now I'm building up the path then setting the text property of the textbox as follows:
_PathFrom = @"\\" + ddlServer.SelectedItem.Value + @"\Logs\" + AppOrSession.SelectedItem.Value + @"\" + ddlKernel.SelectedItem.Value + @"\" + txtLogName.Text;
WebClient MyClient = new WebClient();
_Log = MyClient.DownloadString(_PathFrom);
txtLog.Text = _Log;
thanks