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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T19:20:45+00:00 2026-06-01T19:20:45+00:00

I have created a custom user control that is meant to extend the functionality

  • 0

I have created a custom user control that is meant to extend the functionality of the GridView. It inherits from UserControl and implements IPostBackEventHandler.

The problem I’m having is that the IPostBackEventHandler.RaisePostBackEvent function SOMETIMES does not get called by the framework. I have placed this control on several pages, and on some pages it works fine, and on some pages it does not. I have checked Request[“__EVENTTARGET”] and verified that it is equal to the UniqueID of the control, but RaisePostBackEvent still does not get called.

Is anyone aware of a reason why RaisePostBackEvent might not get called?

Here is the code for my user control:

namespace Warrior.PL.Controls 
{ 
    /// <summary> 
    /// A GridView that supports filter fields at the top of each column. 
    /// </summary> 
    [ParseChildren(ChildrenAsProperties = true)] 
    [ToolboxData("<{0}:FilterableGridView runat=\"server\"></{0}:FilterableGridView>")] 
    public partial class FilterableGridView : UserControl, IPostBackEventHandler 
    { 
    ... 
        #region IPostBackEventHandler Members 

        void IPostBackEventHandler.RaisePostBackEvent(string eventArgument) 
        { 
            if (eventArgument != null && eventArgument.StartsWith("Filter")) 
            { 
                OnFiltering(new GridViewFilterEventArgs()); // This is a function that I created 
            } 
        } 

        #endregion 
    ... 
    } 
} 

Here is the implementation of the control on one of the pages that works:

<warrior:FilterableGridView ID="gvItemCert" runat="server" AllowPaging="true" AllowSorting="true" AutoGenerateColumns="false" CellPadding="4" CssClass="GridView" 
    OnPageIndexChanging="gvItemCert_PageIndexChanging" OnRowDataBound="gvItemCert_RowDataBound" OnSorting="gvItemCert_Sorting" OnFiltering="gvItemCert_Filtering" PageSize="100"> 
    ... 
</warrior:FilterableGridView> 

And here is the implementation on a page where it does not work:

<warrior:FilterableGridView ID="gvEquipSN" runat="server" AllowPaging="true" AllowSorting="true" AutoGenerateColumns="false" CellPadding="4" CssClass="GridView" EnableViewState="false" 
    OnPageIndexChanging="gvEquipSN_PageIndexChanging" OnRowDataBound="gvEquipSN_RowDataBound" OnSorting="gvEquipSN_Sorting" OnFiltering="gvEquipSN_Filtering" PageSize="20"> 
    ... 
</warrior:FilterableGridView> 

The only difference I see is that the one that does not work has EnableViewState=”false”. I have ruled this out as being the problem, though, as setting EnableViewState=”true” does not help anything.

Also, I am using AJAX on both pages.

  • 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-01T19:20:46+00:00Added an answer on June 1, 2026 at 7:20 pm

    It turns out that the previous solution does not work if there are two of these controls on the same page because apparently only ONE control on the page is allowed to call Page.RegisterRequiresRaiseEvent. Furthermore, if a control calls Page.RegisterRequiresRaiseEvent, then none of the other controls on the page get their RaisePostBackEvent function called.

    In fact, this was my whole problem: I had another control on the page that called Page.RegisterRequiresRaiseEvent, so my FilterableGridView never got its RaisePostBackEvent function called!

    I knew there had to be something else going on underneath all of this…

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

Sidebar

Related Questions

I have created a custom server control that inherits from CompositeControl. In the CreateChildControls
I have a custom control Workspace that inherits from Control and within it is
I have an ObservableCollection that is created in user control that contains a custom
I have created a custom user control, which is basicly a ItemsControl with it's
I have a custom ASP.NET user control that is added to a panel on
I have a somewhat complex custom user control, created in C# .NET, which is
I have created a custom control (based on a panel) in wxPython that provides
I have created a custom user control (JCUserControl), and I am using it in
I have created a custom TaskButton control that takes an image and text. The
I have a customized WPF control that is derived from UserControl. In the Resources

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.