Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7721577
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T03:57:35+00:00 2026-06-01T03:57:35+00:00

I am building a GridView which can download songs. So I use a hyperlink

  • 0

I am building a GridView which can download songs. So I use a hyperlink fileld and use DateNavigateUrlFormatString.

E.G.

    DataNavigateUrlFormatString="~/uploads/{0}"

Now,

I need to combine Page.User.Identity.Name into DateNavigateUrlFormatString

For example,

    DataNavigateUrlFormatString="~/uploads/UserName/{0}" which  Page.User.Identity.Name depending on the user login. 

I tried to access DataNavigateUrlFormatString from the code behind but I couldn’t.
I tried to use Eval such as

      '~/uploads/" <%# Eval("Page.User.Identity.Name") %> /{0}'

this doesn’t work as well.

Hope someone could point me out.

Thanks,

L

FInal Solution

     <asp:TemplateField HeaderText="Play">
              <ItemTemplate> 
                    <asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl = '<%#    String.Format("~/UserUploads/{0}/",Page.User.Identity.Name)+ "/" + Eval("Song_Name")  %>' Text="Play" >
                    </asp:HyperLink>

                </ItemTemplate> 
            </asp:TemplateField> 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T03:57:36+00:00Added an answer on June 1, 2026 at 3:57 am

    DataNavigateUrlFormatString expects the placeholder(s) to come from fields in the datasource of the control.

    My suggestion is that since you already know the url you are trying to build you could set the NavigateUrl property of hyperlink control.

    NavigateUrl =  '<%# String.Format("~/UserUploads/{0}/",Page.User.Identity.Name)+ "/" + Eval("Song_Name") %>'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm building a GridView control which encapsulates a child gridview. The child gridview holds
Building a new Mobile Web Platform for Mobile Users to purchase & download content
I picked up some code that is building a Gridview with a SQLDataAdapter. One
Building a commercial product may use various open source libraries that have use of
Just starting out on android developing. To start off, I'm building an app which
I'am building an asp.net application that have a gridview inside an update pannel. In
I am building a CRM. It displays information of customers in a GridView .
Building my first WP theme and I quickly realized that I need to remove
I have a gridview in my website in am building in Visiual studio 2010.
Building off Does Perl have an enumeration type? , how can I perform dynamic

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.