3

I am trying to open Explorer on the client side to view a directory. In my aspx webform, I have a gridview, which has a column of hyperlinks. In the aspx markup, I have the following:

<asp:HyperLink Text="ICPnt" id="MyDir" runat="server" Target="_blank" NavigateUrl='<%# "file://" + Eval("MyDir").ToString() %>' ></asp:HyperLink>  

When the startup the asp.net application in debug mode with Visual Studio and move the cursor over the hyperlink, I see the popup path,

file://MachineName/C$/WINNT/MyDir

This looks correct. When I click on the hyperlink, NOTHING happens. I don't even see the cursor turning to an hourglass icon or anything. I think I am pretty close but can't see the missing step or error.

Another test:

I typed file://MachineName/C$/WINNT/MyDir in both Windows and Internet Explorer and got a new Explorer to pop up and display the directory content from my VM environment. As a test, I copied and pasted the same exact file:// path to my aspx markup and tested again. When I click on it, nothing happens.

<asp:HyperLink Text="ICPnt" id="WSM2MDir" runat="server" Target="_blank" NavigateUrl='<%# "file://MachineName/C$/WINNT/MyDir" %>' ></asp:HyperLink> 

Any help is appreciated. THanks

Levon
  • 138,105
  • 33
  • 200
  • 191
user1250264
  • 897
  • 1
  • 21
  • 54

0 Answers0