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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T04:15:06+00:00 2026-06-14T04:15:06+00:00

How to fix it? I declared handlers in Page_Load, Page_PreRender and markup. It doesn’t

  • 0

How to fix it?

I declared handlers in Page_Load, Page_PreRender and markup. It doesn’t work normaly.

Code:

<asp:GridView ID="tableResults" runat="server" DataMember="Table" EnableModelValidation="True"
    CssClass="GridViewStyle" OnRowDeleting="dataViewRowDeleting" AutoGenerateDeleteButton="True">
    <HeaderStyle CssClass="GridViewHeaderStyle" />
    <RowStyle CssClass="GridViewRowStyle" />
    <Columns>
        <asp:TemplateField>
            <ItemTemplate>
                <asp:HyperLink ID="HyperLink1" runat="server" Text="Скачать объект" NavigateUrl='<%#"objects/" + Eval("Идентификатор") %>'></asp:HyperLink>
            </ItemTemplate>
        </asp:TemplateField>
    </Columns>
</asp:GridView>

Handlers:

tableResults.AutoGenerateEditButton = true;
tableResults.RowEditing += new GridViewEditEventHandler(tableResults_RowEditing);
tableResults.RowUpdating += new GridViewUpdateEventHandler(tableResults_RowUpdating);
tableResults.RowCancelingEdit += new GridViewCancelEditEventHandler(tableResults_RowCancelingEdit);
  • 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-14T04:15:07+00:00Added an answer on June 14, 2026 at 4:15 am

    Alright I tried your code and got the same issue as you. The reason is because you are manually calling Databind in Page_Load but you are not reattaching the datasource. You need reattach your datasource in your edit event handler (as well as other event handlers).

    protected void tableResults_RowEditing(object sender, GridViewEditEventArgs e)
    {
        tableResults.EditIndex = e.NewEditIndex;
        PopulateTableResults();   // In this method I attach the datasource and bind
    }    
    

    If you don’t want to do it manually you need to use the data source control.

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

Sidebar

Related Questions

I need to fix a issue for xss vulnerability. the code segment is below.
I have to fix a glitch with this code someone wrote but I'm not
I have some C++ code, in which the following enum is declared: enum Some
To fix the UITextview blue color issue for links in ios ( i want
How can I fix the following error? error: cs0016 could not write to output
I am trying to fix a regular input box with padding, border, inside a
I found how to fix div position using jQuery. Here is an example .
Is it possible to fix the position of a table, such that it scrolls
I am trying to fix Microsoft word smart quotes (and other word smart characters)
I can't fix this problem on my listview template: i have the error as

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.