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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T14:17:41+00:00 2026-05-11T14:17:41+00:00

It is .net 2.0 here, not MVC, and I am crap at asp forms.

  • 0

It is .net 2.0 here, not MVC, and I am crap at asp forms.

I have a page with user controls on it. When I click on something in the page, I want to load the usercontrol based on a parameter from the page.

I cannot do it.

In my page’s FaultTree_Clicked, I get the value, then:

  • I tried exposing a property on the child user control to set the value, which i set in FaultTree_Clicked, it gets forgotten.

  • I tried saving it to Session[‘mykey’], and loading Session[‘mykey’] in the control’s Page_init… the value is blank.

  • I tried saving it to ViewState[‘mykey’], and loading ViewState[‘mykey’] in the control’s Page_init… the value is blank.

EDIT: more specific info:

Here is a cut down version of what the page(MyFault) looks like:

<form id='form' runat='server'>  <div id='faulttree'>    <asp:TreeView ID='FaultTree' ......>  </div>  <uc1:_DefectDetail ID='DefectDetail' runat='server' Visible='true' EnableViewState='true' /> </form> 

And there is a method on the pages code behind ‘FaultTree_SelectedNodeChanged()’.

When that method is hit, I want to load/show the DefectDetail control. The DefectControl requires a faultid, which comes off the Tree, which I successfully get in the SelectedNodeChanged method. I cannot get the faultid into the defect control.

  • 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. 2026-05-11T14:17:42+00:00Added an answer on May 11, 2026 at 2:17 pm

    This has to do with ASP.NET page lifecycle. By the time the click event fires, the control’s init event has already happened.

    In order to better assist you, please provide a more detailed explanation of what the FaultTree control is, what is the desired result and some sample code.

    UPDATE:

    Instead of a public property, you can simply create a public method in the control that does the desired action and invoke it from the FaultTree_SelectedNodeChangeEvent.

    Example (for a public method named Refresh):

    _DefectDetail.Refresh(object data); 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I heard that ASP.net MVC does not maintain View State.So,here is my question I
I'm using the new Routing feature in ASP.NET 4 (Web forms, not MVC). Now
Have a question about the design/usage of asp.net mvc here. In the html helper
I have been working in ASP.NET Web Applications (not MVC) for a while at
Here's my situation: I have been working on an ASP.NET MVC 3 application for
I am using asp.net mvc. here I am not asking on controller logic but
I have an ASP.NET MVC 3 view using Razor and Knockout.js that is not
i am using asp.net mvc 2 here i have a following class Applicant and
ASP.NET newbie here I have coded up an ASP.NET website and running on win'08
I'm looking at the new version of ASP.NET MVC (see here for more details

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.