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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T10:52:21+00:00 2026-05-11T10:52:21+00:00

I tried to ask this question previously howver I did not recieve the correct

  • 0

I tried to ask this question previously howver I did not recieve the correct response. I am using a GridView in the admin area of site I have designed. I use a DetailsView to insert data into the database, and the Gridview to edit and delete the data.

My query is: When I add data in the DetailsView I enter data like this: ‘PR Murphy & Associates’ Notice the ‘&’.

WHat is happening is that when it display the data in the gridview it displays it as ‘PR Murphy & Associates’ however when I click the edit button it displays ‘PR Murphy &amp Associates’. Notice the encoded & symbol.

My problem is that I don’t want the code to htmlencode the & symbol at all. I am fairly new to ASP.NET and am not sure how to achieve this goal.

IE Is the DetailsView encoding the string when it inserts the data into the database. What code could I use to stop this from happening and what event would I need to target.

In my previous response it was suggested that I set HTMLEncode=’False’ in the gridview. I have tried that with a bound field and it did not make a difference. Also I need this field to be as a TemplateField in the GridView so that I can perform some error handling on the entries.

I hope this makes sense and someone can please guide me in the right directions.

Thanks

  • 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. 2026-05-11T10:52:22+00:00Added an answer on May 11, 2026 at 10:52 am

    I suppose you could with your template call a method that would replace the & with a & again. Since you want a TemplateField this would be the five minute fix that probably wouldn’t be the best way but would work in a pinch.

    Paste some of the code though so we can edit/help.

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

Sidebar

Related Questions

I do not know if this the correct forum to ask this question but
I tried to ask this question before but I guess I didnt explain myself
Well, I tried to ask this question as a comment on this question, but
Sorry to ask this question again but I tried several solutions on stackoverflow and
I have tried to ask a variant of this question before. I got some
I tried to ask this question earlier, but I was unclear in my question.
I ask this question, because I am trying tried to search this information for
I'm not really sure how to ask this question. Suppose I have a class
Not sure if this is an appropriate forum to ask this question, but I've
I tried to ask this question earlyer but I think I rushed the question

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.