I have the following code which is working fine
<asp:TemplateField>
<ItemTemplate>
<div runat="server" id="divFileName" class="divFileName" title='<%# Eval("FileName")%>'>
<%# Eval("FileName")%></div>
</ItemTemplate>
</asp:TemplateField>
the result of Eval("FileName") returns a full path string such as the following:
C:\Windows\Microsoft.NET\Framework\sbs_diasymreader.dll
I would like in the client side to send Eval("FileName"); to a javascript method that will crop Eval("FileName"); value and will return the file name only without the full path. (for this example it should return sbs_diasymreader.dll)
The result of what i am trying to achieve is that eventually the table that currently contains full names with path, will display only the file without the path
How can this be done?
If the FileName field contains the full path you can use FileInfo class