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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T16:46:50+00:00 2026-06-13T16:46:50+00:00

I’ve got a project that I’ve inherited. I’ve been asked to remove two columns

  • 0

I’ve got a project that I’ve inherited. I’ve been asked to remove two columns in a GridView on a website and replace them with two other columns. I’ve changed the html to replace the originals with the new ones however the column header names don’t appear to want to change. I’ve run the code with the debugger on and put a break on the first line of the code c# code before it does anything and checked out the gridview object. It already has these column names assigned and I can’t figure out how. I’ve done a search for the original column names and have been unable to find them anywhere.

Basically, my question is what controls what the column is named before the page even really loads? Every time I’ve searched on this I get people wanted to change it programmatically but that doesn’t appear to be what my issue is from what I can tell. I’ve attempted to go into the properties of the object like it was suggested here but it shows the new fields not the old ones.

The following is the relevant (I believe) HTML code which is creating this gridview and object.

<asp:GridView ID="gvTopSearch" runat="server" AllowPaging="True" 
    AllowSorting="True" PageSize="15" AutoGenerateColumns="False"
    DataKeyNames="NID,CID" Width="100%" OnPageIndexChanging="gvTopSearch_PageIndexChanging"
    OnSorting="gvTopSearch_Sorting" 
    onrowdatabound="gvTopSearch_RowDataBound" 
    meta:resourcekey="gvTopSearchResource1" >
    <Columns>
         <asp:TemplateField SortExpression="NewField1" HeaderText="NewField1" 
            meta:resourcekey="TemplateFieldResource5">
            <ItemTemplate>
                <%#Eval("NewField1")%>
            </ItemTemplate>
             <HeaderStyle Width="75px" />
        </asp:TemplateField>
        <asp:TemplateField SortExpression="NewField2" HeaderText="NewField2" 
            meta:resourcekey="TemplateFieldResource6">
            <ItemTemplate>
                <%#Eval("NewField2")%>
            </ItemTemplate>
            <HeaderStyle Width="75px" />
        </asp:TemplateField>
    </Columns>
    <AlternatingRowStyle CssClass="fieldName" HorizontalAlign="Left" />
    <EmptyDataTemplate>
        <table width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td align="center" style="padding-top: 50px; padding-bottom: 50px; padding-left: 60px;">
                    <img src="" alt="" />
                    <b>
                        </b>
                </td>
            </tr>
        </table>
    </EmptyDataTemplate>
    <HeaderStyle CssClass="fieldNamewithbgcolor" HorizontalAlign="Left" />
    <PagerStyle CssClass="Paging" />
    <RowStyle CssClass="gridbgcolor" HorizontalAlign="Left" />
</asp:GridView>

“NewField1” and “NewField2” are supposed to be displayed but aren’t.

  • 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-13T16:46:50+00:00Added an answer on June 13, 2026 at 4:46 pm

    Gah! I hate this stupid project. I’ve found where the issue is finally (it’s only taken about 3 days).

    In the same directory there’s apparently an App_LocalResources folder with a resx file in it. In that file are key-value pairs including ones seen above ‘TemplateFieldResource5’ and ‘TemplaceFieldResource6’ and they were linked with the old column names. I’ve changed them to the new column names and it works.

    Thanks to those who attempted to help me with your comments. If this is what you meant by the code behind Steve I misunderstood.

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

Sidebar

Related Questions

I've got a string that has curly quotes in it. I'd like to replace
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I know there's a lot of other questions out there that deal with this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I used javascript for loading a picture on my website depending on which small
I have a jquery bug and I've been looking for hours now, I can't
I have a small JavaScript validation script that validates inputs based on Regex. I
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a French site that I want to parse, but am running into

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.