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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:59:30+00:00 2026-05-25T09:59:30+00:00

In my asp .net C# project I have a page defualt.aspx on which I

  • 0

In my asp .net C# project I have a page defualt.aspx on which I have placed 2 components.
So in all I have:

1) default.aspx (main page, not doing much code in it)
2) wuc_Lookup.ascx (doing a lot here, grabbing data, setting session, etc)
3) wuc_PageMessages.ascx (has a couple of panels and labels for message output

)

The intent is to use 3) in any page in my application. 1) and 2) are already working. My issue is that the Page_Load sequence is:

1st default Loads
2nd wuc_pageMessage loads
3rd wuc_lookup loads

The problem with this is that The wuc_pageMessage is relevant only after wuc_lookup runs.

My intent was not to put code in Page_Load for the message wuc_pageMessage control because I wanted to be able to call a method to post the message during the component load of wuc_lookup. I do this because only after wuc_lookup do I set the session which I use for the message value.

I actually got values showing up if I put the code in wuc_lookup to manipulate the code-in-front server control (panels and labels) using this.parent.findControl syntax…

But then when I try to rip that code and put it into the code-behind for wuc_pageMessage, and then call the method from the wuc_lookup it has fallen out of scope or context…

So I tried to change this.Parent by passing httpContext.current.handler as casting it as page…that didn’t work…then I tried passing Object sender from the calling component…that didn’t work either. Neither of them had the Parent property and or it was null which led me to believe that once the wuc_PageMessages.ascx loaded it was a dead deal until a repost happens and that is ugly and something I don’t want to do.

I am having some implementation issues and I am not sure what to do. I have been stunk on this for eight hours and Is there just something I am not seeing?

I want to keep away from spagetti code. I don’t want to have to scatter code-behind in 3 different files. Theoretically I should only need 2 of these to talk to eachother. i don’t want code-behind in default..it’s basically just a container. I want to trigger the wuc_pageMessage from wuc_Lookup.ascx without having it be “in” wuc_Lookup.ascx (peer web user controls) I want that to always be a peer relationship. Any advice would be great …thanks…

  • 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-25T09:59:31+00:00Added an answer on May 25, 2026 at 9:59 am

    Try moving the wuc_PageMessages logic from the page_load to the page_prerender event.

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

Sidebar

Related Questions

I am using asp.net/C# for my project.Currently i have a default.aspx page and a
I have a javascript function in the default.aspx page of my asp.net website project.
I have an ASP.NET project. Currently, it starts on the Default.aspx page. However, I’d
I have a master page in my asp.net MVC project, which has code like
I'm working on asp.net (C#) project which include some page files (aspx, aspx.cs) and
We have a asp.net app, in which index.aspx is the default document in the
I have accumulated an ASP.NET project that was running everything off of one page
I have an ASP.NET project connecting to a database. A web page sends a
I have a hybrid ASP.NET WebForms/MVC project. In my Master Page, I have a
I have a MVC3 ASP.NET Project in which I am using jQuery and KendoUI

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.