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

The Archive Base Latest Questions

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

On my webpage I am loading multiple instances of a usercontrol, sometimes the usercontrol

  • 0

On my webpage I am loading multiple instances of a usercontrol, sometimes the usercontrol is laoded within itself. I need to save a bunch of properties for the round trip of a post back but i am confused on how to save those properties to ViewState and set them again to the repeater items within the usercontrol.

Can anyone help me in this situation, I have read the MSDN on Viewstate but I am not understanding it quite well for some reason

This is how I load the parent user controls (child controls are loaded the same way with the same user control)

Protected Sub Load_Controls(ByVal list As List(Of BSEvaluationGroup.category), ByVal gid As Integer, ByVal pid As Integer, ByVal fid As Integer)
    Dim item As BSEvaluationGroup.category
    For Each item In list
        Dim ctl As PerformanceEvaluationSubcontractorControl = CType(Page.LoadControl("PerformanceEvaluationSubcontractorControl.ascx"), PerformanceEvaluationSubcontractorControl)
        ctl.categoryid = item.catid
        ctl.categoryname = item.catname
        ctl.projectid = pid
        ctl.folderid = fid
        ctl.groupid = gid
        ctl.parentid = item.parid
        ctl.clist = item.categories
        ctl.plist = item.points
        ctl.parentpage = Me
        ctl.EnableViewState = "true"
        If (Not subcon Is Nothing AndAlso Not subcon.points Is Nothing) Then
            ctl.epnts = subcon.points
        End If
        AddHandler ctl.BubbleCalculate, AddressOf Me.PostRating

        Select Case gid
            Case 1
                Me.officephld.Controls.Add(ctl)
                Dim ohrule As HtmlGenericControl = New HtmlGenericControl("hr")
                ohrule.Style.Add("width", "100%")
                ohrule.Style.Add("background-color", "Silver")
                ohrule.Style.Add("size", "1px")
                ohrule.Style.Add("border-width", "0")
                ohrule.Style.Add("padding-top", "1px")
                ohrule.Style.Add("float", "left")
                Me.officephld.Controls.Add(ohrule)
            Case 2
                Me.sitephld.Controls.Add(ctl)
                Dim shrule As HtmlGenericControl = New HtmlGenericControl("hr")
                shrule.Style.Add("width", "100%")
                shrule.Style.Add("background-color", "Silver")
                shrule.Style.Add("size", "1px")
                shrule.Style.Add("border-width", "0")
                shrule.Style.Add("padding-top", "1px")
                shrule.Style.Add("float", "left")
                Me.sitephld.Controls.Add(shrule)
        End Select
    Next
End Sub
  • 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-25T18:30:26+00:00Added an answer on May 25, 2026 at 6:30 pm

    It was a control ID issue, I removed it instead of adding an ID

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

Sidebar

Related Questions

I have a WebView that is loading a webpage. I want to save all
Within a webpage, upon loading, I fill a dataset with two table with a
I have a webpage loading inside my WinForm application using C# I need to
I'm currently loading a webpage using a thread and I need a progress bar
When my webpage is loading, I use javascript to detect which browser is visiting
I'm loading an webpage from my application and keep on browsing and move to
I'm loading part of my webpage using AJAX, in particular jQuery.load() . With this
I need a js code for always getting the server time in a webpage.
I'm loading a webpage inside a HTML component in AIR. By default, when something
I have a webpage where I am loading a twitter feed via ajax. My

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.