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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:59:14+00:00 2026-05-23T13:59:14+00:00

I am usin the HyperLinkField in my asp.net application. However when I use the

  • 0

I am usin the HyperLinkField in my asp.net application.

However when I use the DateNavigateUrlFormation I meet some problem:

This is the code :

<asp:hyperlinkfield datanavigateurlfields="tab_name,rowid" 
  DataNavigateUrlFormatString="~\details.aspx?tab={0}&rowid={1}" />

Since sometime the rowid may contain some characters which has the specified meaning in the http,so in the server side I can not get the correct rowid.

For example,the rowid of one row maybe

AAAAAAAXXX+BA

Now the generated url would be :

http://xxx/details.aspx?tab=tab_name&rowid=AAAAAAAXXX+BA

Since there is a character + here,I want to excape it.

I tried this:

DataNavigateUrlFormatString="~\details.aspx?tab={0}&rowid=<%#Server.HtmlEncode({1})%>"

It does not work also.

Any ideas?

  • 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-23T13:59:15+00:00Added an answer on May 23, 2026 at 1:59 pm

    You need to handle this in the RowDataBound event.

    if (e.Row.RowType == DataControlRowType.DataRow)
    { 
        e.Row.Cells[indexOfYourColumn].Text = Server.HtmlEncode(e.Row.Cells[indexOfYourColumn].Text);
    }
    

    Update

    Take a look at this article

    According to that you can programatically access the hyperlink field.

    HyperLinkField hLink = GridView1.Columns[0] as HyperLinkField;
    hLink.DataNavigateUrlFormatString = "details.aspx?pi=" + GridView1.PageIndex.ToString() + "&eID={0}";
    

    OR I think what you need is to handle it in the RowDataBound event.

    HyperLink hLink = e.Row.Cells[0].Controls[0] as HyperLink;
    hLink.NavigateUrl = "test.aspx?q=" + e.Row.Cells[0].Text;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So, I have a REST application and looks like this: @GET @Produces(MediaType.APPLICATION_JSON) @Path(/getpartners) public
I use easy_install to install the openpyxl and it was successfully installed. However when
I am trying to get this code (from a blog) working. The download file
i am usin rowdatabound event of gridview to do some formating in gridview column.
Hello I'm usin Fluent Nhibernate and SQLite in my WPF application. Fluent Nhibernate Version
This is a weird one. I am trying to use Views in MySQL (I'm
I am developing ASP.NET MVC WEB API service. As everywhere i need security tokens.
I am using ASP.net MVC 3 for a project, and at a point now
I'm usin Windows.Forms aplication and I can get files or directory from my user
I am usin the nsxmlparser and am wondering how I can parse ISO-8859-1 correctly

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.