javascript to open a file from local settings temp folder

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Blacky
    New Member
    • Jan 2009
    • 40

    javascript to open a file from local settings temp folder

    Hi I used the following script in my aspx.cs page for opening a xml file in new window,

    Code:
    StringBuilder strScript = new StringBuilder();
            strScript.Append("<script language='javascript' type='text/javascript'>");
              
           strScript.Append("window.open(belva_14_02_2009518.xml','access','left=0, top=0, toolbar=no,menubar=no,width=1000,height=8000,resizable=yes,scrollbars=yes');");
            strScript.Append("</script>");

    it works fine.. for the file being in application folder itself.
    How to open a xml file from local settings temp folder and display in new window..

    i tried giving 'C:\\Documents and Settings\\AS\\L ocal Settings\\Temp\ \belva_14_02_20 09518.xml' for the filename.. but it shows nothing.

    Please reply asap.

    Thanks in advance
    Last edited by Dormilich; Dec 2 '09, 11:47 AM. Reason: Please use [code] tags when posting code
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    How to open a xml file from local settings temp folder and display in new window..
    do you mean on the client or the server?

    if it’s on the client, you may have a chance with IE and very liberal security settings, on the server you can only access files somewhere in the server’s root directory

    Comment

    Working...