File Manipulation

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Kalai Mahendran
    New Member
    • Mar 2011
    • 1

    File Manipulation

    Hi,

    I am having number of files in directory. Intially i want to load the first file without passing query string, with the first file there should have next file link. Once the next link button is clicked then only have to pass the query string.

    how to pass the query string from second file to end of the file,

    DirectoryInfo oImageFolderInf o = new DirectoryInfo(t his.ImagePath);
    FileInfo[] oFileList = oImageFolderInf o.GetFiles("*.* ");


    string fileName=string .Empty;

    if (Request.QueryS tring["filename"] != null)
    {
    fileName=(Reque st.QueryString["filename"]);

    }

    else
    {
    fileName = oFileList[0].Name;
    }

    HtmlImage imag = new HtmlImage();
    imag.Src = Url + fileName;


    HtmlAnchor nextAnchor = new HtmlAnchor();
    nextAnchor.Href =??
    nextAnchor.Inne rText = "Next>>";

    HtmlAnchor prevAnchor = new HtmlAnchor();
    prevAnchor.Href =??
    How to proceed this same upto reaching the end of the file?
Working...