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

  • Home
  • SEARCH
  • 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 786969
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T21:07:37+00:00 2026-05-14T21:07:37+00:00

I have an ASP.NET user control that is used in another use control. The

  • 0

I have an ASP.NET user control that is used in another use control. The parent user control uses data-binding to bind to a custom property of the child user control.

What method can I override or page event where I am ensured that the property state is set?

I think in a page it is PageLoaded versus the Page_Load override? I am looking for this in the user control because my property is always null even though it is set.

Thanks.

Example. This is in my user control. FilterEntryId is being bound from inside another user control:

protected int _filterEntry = -1;
    public int FilterEntryId
    {
        get
        {
            return _filterEntry;
        }
        set
        {
            _filterEntry = value;
        }
    }


    protected void Page_Load(dobject sender, EventArgs e)
    {
        FilterEntry always -1!!
    }

The property is being set but never has value when Page_Load. The Page_LoadComplete may be the proper place but does not seem to be an option in user control. I’ve also tried Page_DataBind.

My hypothesis is that this is a page lifecycle issue but it may be something else.

  • 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-14T21:07:38+00:00Added an answer on May 14, 2026 at 9:07 pm

    Not sure what you need to do with that property but since you can’t be sure when will be set. Can’t you add your logic on the set of the property?

    Another option would be a later event as PreRender.

    public int FilterEntryId
        {
            get
            {
                return _filterEntry;
            }
            set
            {
                _filterEntry = value;
                 //HERE YOUR LOGIC
            }
        }
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have used Subsonic ORM in ASP.NET. It has Scaffold user control that generates
I have an asp.net user control on which I want to use jquery ajax.
I have an asp.net user control, userControl1.ascx, and another user control, userControl2.ascx. userControl2 is
I used to have an embedded user control in an ASP.NET web site which
I am used to ASP.NET where each user control would have its own codebehind,
I have made a user control in asp.net c#. Becuase of some data I
I have an ASP.NET user control (.ascx file). In this user control I want
I have two user controls in my ASP.Net project, one that is explictly for
I have a fairly big asp.net website that use GridView bound to the same
I have a created a user control that is hopefully going to be used

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.