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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T18:11:07+00:00 2026-06-11T18:11:07+00:00

We have the following code in an UpdatePanel. <asp:UpdatePanel ID=UpdatePanelSearch runat=server UpdateMode=Conditional> <ContentTemplate> <p>Parent

  • 0

We have the following code in an UpdatePanel.

 <asp:UpdatePanel 
    ID="UpdatePanelSearch" 
    runat="server" 
    UpdateMode="Conditional">

    <ContentTemplate> 
        <p>Parent Search:
            <asp:TextBox ID="TextBoxSearch" runat="server" Width="207px"></asp:TextBox>
            <asp:Button ID="ButtonSearch" runat="server" Text="Search" />
        </p>
    </ContentTemplate>
 </asp:UpdatePanel>

The code in the VB file looks like this to handle clicking the Search button so a GridView will display data based on the value entered into the TextBox.

The GridView is also in a separate UpdatePanel:

Protected Sub ButtonSearch_Click(sender As Object, e As EventArgs) Handles ButtonSearch.Click

    GridViewParentsSummary.DataSource = theTableAdapter.GetData(strSearchText)
End Sub

We would like to create a trigger to update the GridView if that is the correct thing to do here.

Here is the GridView:

    <ContentTemplate> 
        <asp:GridView
            ID="GridViewParentsSummary" 
            runat="server" 
            AllowPaging="True" 
            AllowSorting="True" 
            AutoGenerateColumns="False" 
            DataKeyNames="ID" 
            PageSize="3"
            >

            <Columns>

                <asp:BoundField 
                    DataField="FatherName" 
                    HeaderText="Father's Name" 
                    SortExpression="FatherName" />

                <asp:BoundField 
                    DataField="MotherName" 
                    HeaderText="Mother's Name" 
                    SortExpression="MotherName" />

                <asp:ButtonField 
                    ButtonType="Button" 
                    CommandName="Select" 
                    Text="Select This Parent" />
            </Columns>
        </asp:GridView>
    </ContentTemplate>
</asp:UpdatePanel>

Can you show the needed code required to make the correct trigger that will refresh the GridView?

  • 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-11T18:11:08+00:00Added an answer on June 11, 2026 at 6:11 pm

    If the GridView is in another UpdatePanel it should also update when another UpdatePanel updates. By default, the UpdatePanel.UpdateMode property is set to Always and this will cause all UpdatePanel in page to refresh.

    However, this is not always the desired behavior so many time you’ll change it to Conditional which means that the UpdatePanel will be refreshed only if one of its triggers was fired. In that case, you need to add this line in the ButtonSearch_Click method:

    gridUpdatePanel.Update() 'assuming gridUpdatePanel is the UpdatePanel with the grid
    

    for more information about the UpdateMode property look here:
    http://msdn.microsoft.com/en-us/library/system.web.ui.updatepanel.updatemode.aspx

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

Sidebar

Related Questions

I have the following ASPX code: <asp:ScriptManager ID=ScriptManager1 runat=server /> <asp:UpdatePanel runat=server ID=UpdatePanel UpdateMode=Conditional>
I have the following structure <asp:UpdatePanel ID=MyUpdatePanel runat=server> <ContentTemplate> <asp:MultiView ID=MyViews runat=server> <asp:View ID=List
I have the following really simple code <asp:ScriptManager ID=ScriptManager1 runat=server> </asp:ScriptManager> <asp:UpdatePanel ID=UpdatePanel1 runat=server>
I have the following code: <asp:FormView ID=PhotoFormView runat=server DataKeyNames=PhotoID DataSourceID=PhotoDataSource> <EmptyDataTemplate> No photo here.
I have the following code, and I can't get the UpdatePanel to Update. Any
I have following code in initialization im = imread('Image02.tif'); figure(); imagesc(im); colormap(gray); [hImage hfig
I have following code <div id=main> <div id=one> </div> <div id=two> </div> <div id=three>
I have following code for updating user's column public void UpdateLastModifiedDate(string username) { using
I have following code for loading image from url in xml parsing endElement method
I have following code for inserting data into database using PDO. It inserts data

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.