Link to home
Start Free TrialLog in
Avatar of elliottbenzle
elliottbenzle

asked on

asp.net VB - help adding text to dynamic element

On my page I have this code:
<asp:TemplateField HeaderText="Document" >
     <ItemTemplate>
<asp:HyperLink  
text='<%# Eval("doc_loc") %>'  
navigateurl='<%# Eval("doc_loc") %>' target='_blank' runat='server' />
</asp:HyperLink>
    </ItemTemplate>
</asp:TemplateField>

I want to add a folder to the 'navigateurl' element so that     /pdf/       goes before the  <%# Eval("doc_loc") %>

What is the correct syntax to do this? I tried
navigateurl='"/pdf/"<%# Eval("doc_loc") %>'

but got an error.

Thanks for any help.
ASKER CERTIFIED SOLUTION
Avatar of Ramkisan Jagtap
Ramkisan Jagtap
Flag of Finland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Easwaran Paramasivam
Try wiht navigateurl ="/pdf/" + <%# Eval("doc_loc") %>.

If it is not working give relative path "~/pdf/" + <%# Eval("doc_loc") %>. Or better absolute path of the folder.
Avatar of elliottbenzle
elliottbenzle

ASKER

Thanks again