Hi, I have very little C# programming experience and it would be much appreciated if you could help me with this problem.
Currently I am using file dialogue control and browsing my computer to find and upload a csv file that i want to display in gridview, however i want to read a csv file which will be stored in the app_data folder and display it in gridview when I click on a page. I understand that the code should be in page_load event but i dont know how to do it. My code is shown below:
protected void Page_Load(object sender, EventArgs e) {
}
protected void Button1_Click(object sender, EventArgs e) { if (FileUpload1.PostedFile.FileName == string.Empty) { lblMsg.Visible = true; return; } else { string[] FileExt = FileUpload1.FileName.Split('.'); string FileEx = FileExt[FileExt.Length - 1]; if (FileEx.ToLower() == "csv") { //save the file FileUpload1.SaveAs(Serve ...

Go to the complete details ...