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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T19:32:40+00:00 2026-05-11T19:32:40+00:00

I want to make use of complex usercontrols with more than one control element

  • 0

I want to make use of “complex” usercontrols with more than one control element within. It’s the same control I will reuse in the list, and I have a PlaceHolder control for it already.

I can add the control with LoadControl(path to .ascx) – no problem.

I can through my custom properties get/set access the embedded Labels, too, so I can initialize each control perfectly.

But when adding LinkButtons, I get into trouble/problems.

When I click the button, I do get a “submit” of the page rendering the controls; but the control’s own button event does not seem to fire (or at least PageLoad on the parent page seems to fire first?) – I can’t figure out where my event goes or where to look for a name/ID or parameter for this button.

How come or what am I doing wrong here?

I’ve made a “fake button” now by using a label more with a “hardcoded A HREF” with an ID in the URL, but I would like to learn what event I need to catch and where or how to init the button, because I want to be able to use “default ASP.NET” controls for these usercontrols (hopefully without too much patchwork-coding)…

  • 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-11T19:32:40+00:00Added an answer on May 11, 2026 at 7:32 pm

    The only reason that events get “lost” is because your controls are not being recreated in such a manner that ASP.Net can associate the event with the control after the postback. It does so through the use of the ID property.

    In other words, you’re doing one of three things wrong:

    1) You’re assigning the ID’s of your linkbuttons differently during the creating phase in Init after the postback

    2) You’re creating your linkbuttons dynamically using code, but you’re doing it after the Init phase of the page lifecycle, so that your controls do not participate in ViewState.

    3) You’re re-binding the datasource of the parent control containing the linkbuttons on every postback. Use if (!IsPostBack) to prevent rebinding it every time.

    Without seeing your code I can’t give anything more specific than that unfortunately.

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

Sidebar

Related Questions

I want to make a tray applet using Qt that will use an output
I need a little advice how to make Zend Framework breadcrumbs more complex than
I want to make use of an API but it print alot of info
I want to develop multimedia encoder for Linux. I want to make use of
I'm building a few SharePoint sites, and I want to make use of zones
I am using a ARM Cortex-M3, and a Cortex-M4. I want to make use
I make extensive use of Struts2 in my application. Now I want to add
If I want to make a rule dynamic so i can use assert after
I want to make editable cells with multi-lines content in QTreeWidget and I use
i want to make a splash screen on my android application, i use phonegap.

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.