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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:42:00+00:00 2026-05-27T17:42:00+00:00

i had binding some data to gridview in a page loadevent….. And the gridview

  • 0

i had binding some data to gridview in a page loadevent…..

And the gridview is in update panel..

i had included a Button in Each row of gridview using template field..

Every thing is working fine, But when i click on Button i am assigning a Row content’s to a labels which is outside the update panel…

But this is not happening……

The Code Snippet inside the Button is working fine!!!!!

Because it was working good before the use of Update Panel…….. Since the Whole page was Posting to a server to avoid this i used Update Panel..

But it is arrising another problem..

Can any Suggest how can i get out this kind of problem!!!!!!!!!!!

Thank in Advance!!!!

  • 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-27T17:42:01+00:00Added an answer on May 27, 2026 at 5:42 pm

    When you generates a postback inside an UpdatePanel, by default, only the content within the panel is updated. That’s the magic of the UpdatePanel 🙂

    You’ll need to include the labels you want to modify inside the same update panel the grid is or wrap them on a separated UpdatePanel and update it if the grid panel get updated.

    Here you have a sample about how to trigger the update of a second update panel.

    <%@ Page Language="C#" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <script runat="server">
        protected DateTime LastUpdate
        {
            get
            {
                return (DateTime)(ViewState["LastUpdate"] ?? DateTime.Now);
            }
            set
            {
                ViewState["LastUpdate"] = value;
            }
        }
    
        protected void Button1_Click(object sender, EventArgs e)
        {
            if (LastUpdate.AddSeconds(5.0) < DateTime.Now)
            {
                UpdatePanel1.Update();
                LastUpdate = DateTime.Now;
            }
        }
    
        protected void Page_Load(object sender, EventArgs e)
        {
    
            ScriptManager1.RegisterAsyncPostBackControl(Button1);   
            if (!IsPostBack)
            {
                LastUpdate = DateTime.Now;
            }
        }
    </script>
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
        <title>UpdatePanelUpdateMode Example</title>
    </head>
    <body>
        <form id="form1" runat="server">
            <div>
                <asp:ScriptManager ID="ScriptManager1"
                                   runat="server" />
                <asp:Panel ID="Panel1"
                           GroupingText="UpdatePanel1"
                           runat="server">
                    <asp:UpdatePanel ID="UpdatePanel1"
                                     UpdateMode="Conditional"
                                     runat="server">
                        <ContentTemplate>
                            <p>
                                The content in this UpdatePanel only refreshes if five or more
                                seconds have passed since the last refresh and the button in
                                UpdatePanel2 was clicked. The time is checked
                                server-side and the UpdatePanel.Update() method is called. Last
                                updated: <strong>
                                    <%= LastUpdate.ToString() %>
                                </strong>
                            </p>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </asp:Panel>
                <asp:Panel ID="Panel2"
                           GroupingText="UpdatePanel2"
                           runat="server">
                    <asp:UpdatePanel ID="UpdatePanel2"
                                     runat="server">
                        <ContentTemplate>
                            <p>
                                This UpdatePanel always refreshes if the button is clicked.
                                Last updated: <strong>
                                    <%= DateTime.Now.ToString() %>
                                </strong>
                            </p>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </asp:Panel>
                <asp:Button ID="Button1" Text="Button1" runat="server" OnClick="Button1_Click" />
            </div>
        </form>
    </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Has anyone had experience using SSL with net.tcp binding in WCF? Ive read its
UPDATE: After some additional reading, what I really wanted was guaranteed early binding (which
I had some vb-net-late-binding-operations-cannot-be-converted-to-an-expression-tree errors VB.Net Late binding operations cannot be converted to an
I need to modify some data bindings dynamically. So I had planned to perform
I have a data entry form that had several comboboxes on it. Each of
I've never had to do this, but I'm binding a repeater to a generic
Had an interesting discussion with some colleagues about the best scheduling strategies for realtime
Had a page that was working fine. Only change I made was to add
I had a discussion with some colleagues mentioning that there are not too many
I've got a simple ListView which pulls data from an ObservableCollection and I'm using

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.