Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Mar 2013
    Posts
    13
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Opening folder in ASP Through Code

    Hi,

    I am trying to open the folder . I wrote the code like below.

    <%

    HELP_URL = "\ISSelfServicePortalDocs"
    HELP_LABEL = "IS Portal Help Docs"



    %>

    <table class="TableBorderBlack1Trans" width="100%" align="center" style="margin-top: 0px; margin-bottom: 5px" >
    <tr>
    <td class="TableMedBlue" align="center"><%=TITLE%></td>
    </tr>
    <tr>
    <td>
    <table style="table-layout: fixed; margin-top: 0px; margin-left: 2px;">

    <tr>
    <td align="center">
    <a onmouseover="window.status='<%=HELP_LABEL%>'; document.getElementById('ess-img2').className='ess-hover'; return true;"
    onmouseout="window.status=''; document.getElementById('ess-img2').className='ess'; return true;"
    class="V1BlackBoldDBlueUL2" href="<%=HELP_URL%>" onclick="window.open(this.href, 'popupwindow', 'width=400,height=300,scrollbars,resizable'); return false;"><%=HELP_LABEL%></a>
    </td>
    </tr>


    </table>
    </td>
    </tr>
    </table>

    But The folder is opened like the attachemnt1. But i want to open the folder like attachement 2. It has to show all files in proper format. Please help me on this.

    Thanks,
    Ashok
    Attached Thumbnails Attached Thumbnails Opening folder in ASP Through Code-capture3.png   Opening folder in ASP Through Code-capture4.png  

  • #2
    Senior Coder DanInMa's Avatar
    Join Date
    Nov 2010
    Location
    Salem,Ma
    Posts
    1,577
    Thanks
    13
    Thanked 248 Times in 248 Posts
    you would need a way to open "windows explorer" on the client's computer. I dont believe you can do that with wshell, you might be able to pull it off using an activex object btu that would only work in IE if it worked at all

  • #3
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    26,561
    Thanks
    80
    Thanked 4,496 Times in 4,460 Posts
    No, Dan. He really is opening a FOLDER on the *SERVER*.

    That's the normal display of a folder from IIS is you have directory browsing enabled on the server. (Not a good idea, at all, for inTERnet usage but usually okay for inTRAnet.)

    But that display he shows is the only one he can get from IIS, even with directory browsing enabled.

    To get the other display he would *HAVE* to be on an inTRAnet and he'd have to specify the full LAN path to the folder in question.

    Oh...and this really has nothing whatsoever to do with ASP. All of this would be the same if those names he is dumping in via ASP code were just hard-coded into the HTML. It's really strictly an IIS question, as posed.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #4
    New Coder
    Join Date
    Mar 2013
    Posts
    13
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Hi Pedant/Dan,

    Yes i enabled the "directory browsing" in IIS. Currently i am able to see output like attchment1 but i m trying to display output like attachment2.

    Is there any way for opening folder like Attachment2?

    Thank you very much for your replies.

    Thanks,
    Ashok

  • #5
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    26,561
    Thanks
    80
    Thanked 4,496 Times in 4,460 Posts
    I answered that already:
    To get the other display he would *HAVE* to be on an inTRAnet and he'd have to specify the full LAN path to the folder in question.
    There's no way to do this on the inTERnet.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •