I am trying to open the directories which I have paths in the links. When I click on the link I can see the path at the current page's bottom left corner, but nothing happens. When I typr or copy paste same path in the browser address field I can open
the directory. Do you have any idea what I can do to open the directory by clicking the link. Here are the codes for it.
I am adding file:// to the query. So I create a field with the neccessary path.
string
sql = string.Format("SELECT
*, 'file://'+ path AS filePath FROM SLM_Directory WHERE visible = '{0}' ORDER BY path;",
true);
New Career
Member
2 Points
5 Posts
Opening a folder with the link in gridview
Apr 29, 2012 06:23 AM|LINK
I am trying to open the directories which I have paths in the links. When I click on the link I can see the path at the current page's bottom left corner, but nothing happens. When I typr or copy paste same path in the browser address field I can open the directory. Do you have any idea what I can do to open the directory by clicking the link. Here are the codes for it.
I am adding file:// to the query. So I create a field with the neccessary path.
string sql = string.Format("SELECT *, 'file://'+ path AS filePath FROM SLM_Directory WHERE visible = '{0}' ORDER BY path;", true);
Then in the aspx file:
<asp:TemplateField HeaderText="View">
<ItemTemplate>
<a runat="server" href='<%# DataBinder.Eval(Container, "DataItem.filePath")%>'>view</a>
</ItemTemplate>
When I click, what I see is file:///C:/MKS but it is not opening.