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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T11:22:46+00:00 2026-06-02T11:22:46+00:00

I have GridView and Button controls nested inside a Panel . <asp:Panel ID=PanelPopUp runat=server>

  • 0

I have GridView and Button controls nested inside a Panel.

<asp:Panel ID="PanelPopUp" runat="server">

    <asp:gridview ID="gvSource" runat="server" CellPadding="4" ForeColor="#333333" 
        GridLines="None">
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <EditRowStyle BackColor="#999999" />
        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
    </asp:gridview>
    <asp:Button ID="OKButton" runat="server" Text="Close" /> 

</asp:Panel>

I want to have this GridView appear as PopUp while I trigger my AJAX ModalPopUp Extender control

<act:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="btnMock" PopupControlID="PanelPopUp" OkControlID="OKButton">

</act:ModalPopupExtender>

This popup is triggered to this button:

<asp:Button ID="btnMock" runat="server" Text="Process" OnClientClick="document.getElementById('btnProcess').click();"/>

There is also another button:

<asp:Button ID="btnProcess" runat="server" Text="" Style="visibility:hidden;" 
        onclick="btnProcess_Click" />

This button event handling (in server side):

protected void btnProcess_Click(object sender, EventArgs e)
{
    //Basically populating data and bind it to GridView 
}

My situation:

  1. ModalPopUp TargetControl doesn’t trigger server side event
  2. So the there is no point handling the event of TargetControlID (btnMock) as it will never get to be executed
  3. So I create another button btnProcess which has the event handled
  4. The event is actually performing databinding to gvSource
  5. The btnMock is the target control of the modal extender and also trigger the execution of btnProcess
  6. However it doesn’t work in my desired order. So btnMock will display popup first then only *have the btnProcess click*ed.

My question:

Is it impossible to perform databinding during modal pop up controller execution? This workaround I tried using hidden button is not currently working in a proper order. Can anyone advise on this?

  • 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-02T11:22:48+00:00Added an answer on June 2, 2026 at 11:22 am

    hide popup trigger button:

    <asp:Button ID="btnMock" runat="server" Text="" Style="visibility:hidden;"  />
    

    show another button and it will be the model popup control button and you need to handle click event like below.

    <asp:Button ID="btnProcess" runat="server" Text="Process" onclick="btnProcess_Click" />
    
    protected void btnProcess_Click(object sender, EventArgs e)
    {
        //Basically populating data and bind it to GridView 
    
    
        ModalPopupExtender1.Show();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have 2 select Button controls in a GridView like this <asp:datagrid style=Z-INDEX: 0
I have a Gridview with these parameters: <asp:GridView runat=server ID=ItemGrid CssClass=Grid AutoGenerateColumns=false AutoGenerateDeleteButton=true OnRowDeleting=RowDeleting
So I have a GridView in my ASPX page. When I click <asp:Button id=btnBindIt
I have a TemplateField column in a gridview with a button inside of it.
I have a button inside of a gridview's template field. Onclick i want to
I have a ASP.NET GridView that uses template columns and user controls to allow
I want to provide custom paging in grid view. <asp:GridView ID=gvFirst runat=server AutoGenerateColumns=false AllowPaging=true
I have a gridview with multiple rows, each has a Update button and I
I have a Clear button which sets the gridview datasource to null and binds
want to have a Hyperlink-Button in a gridView in which I can display a

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.