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 5973153
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:45:35+00:00 2026-05-22T20:45:35+00:00

I am using listview and in listview in Item Template, i have anchor tag

  • 0

I am using listview and in listview in Item Template, i have anchor tag with href.

<a class="linkbutton" href='<%# string.Format("Movie/Hindi-Movie/{0}/{1}",Eval("MovieId"),Eval("MovieName")) %>'><%#Eval("MovieName")%></a>

and in Global file

i have

routes.MapPageRoute("HindiAboutMovie", "Movie/Hindi-Movie/{MovieId}/{MovieName}", "~/Bollywood/AboutMovie.aspx");

This works fine.
but in MovieName i have space between words which makes the url ugly by placing ‘%’ in blank space.

like

http://localhost:5703/Movie/Hindi-Movie/43/Kucch%20Luv%20Jaisaa

where i am trying to make

http://localhost:5703/Movie/Hindi-Movie/43/Kucch-Luv-Jaisaa

How to handle this html side in string.Format?

Please guide me.

  • 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-05-22T20:45:36+00:00Added an answer on May 22, 2026 at 8:45 pm

    I tried this approach.

    In Html i wrote

    <a class="linkbutton" href='<%# string.Format("Movie/Bollywood-Movie/{0}/{1}",Eval("MovieId"),GetMovieName(Eval("MovieName"))) %>'>
    

    and in code behind i wrote a method.

    public string GetMovieName(object obj)
        {
            string moviename = Convert.ToString(obj);
            string newmoviename= moviename.Replace(" ", "-");
            return newmoviename;
        }
    

    This did solve my issue at the moment. 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a ListView that has a Button in the item template. Is there
actually, i'm developing a web template using ASP.NET and C#. i have a listview
I have a following ListView item template, in which I am trying to bind
I have an asp:listview using a css class. On my dev system (VS2008), it
I'm using a ListView in an instance where I'd like to have two Item
I have been following the following post on using multiple ItemTemplates in a ListView
I'm using a PopupWindow to show some subcategories when clicking on a ListView item.
How do I do pagination using ListView. For an example, I have 12 records
I have a WPF ListView control containing a number of RadioButton controls using data
I am using an ASP.NET ListView control and, at the moment, I have a

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.