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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T06:53:36+00:00 2026-05-15T06:53:36+00:00

My Problem is when I want to use UserControl with parameter. it call both

  • 0

My Problem is
when I want to use UserControl with parameter.

it call both constructor( constructor with no parameter And constroctor with parameters)

is this normal situation??

if not, how should I construct the object.

public partial class FreeExperience : Arche.Web.UI.UserControlBase
{
    private ItemInfo itemInfo;
    public FreeExperience() : base()
    {
    }
    public FreeExperience(ItemInfo itemInfo) : this()
    {
        this.itemInfo = itemInfo;
    }

here I made simple userControl ,

and Call it like this on the another page.

<%@ Register TagPrefix="uc" TagName="FreeExperience" Src="include/FreeExperience.ascx" %>

…

<uc:FreeExperience ID="ucFreeExperience" runat="server"/>

And On the Page_load function of this webpage’s CS

ucFreeExperience = new Arche.Itempage3.include.FreeExperience(itemInfo);
  • 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-15T06:53:37+00:00Added an answer on May 15, 2026 at 6:53 am

    Dont use constructors on user controls.

    Expose properties with get/set accessors.

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

Sidebar

Related Questions

this is a post back problem (I don't want to use the client side
I have a problem. I want to use a LINQ query against this database:
Problem I want to use the interactive debugger with IntelliJ. Unfortunately, I can't convince
I'm working on machine learning problem and want to use linear regression as learning
I want to use MSVC compiler to build a DLL file. The problem is
I want to use cglib as my proxy mechanism for spring. problem is, i
The problem I'm having is that I want to use STL's sort with a
I have a problem with dojox.form.Uploader. I want to use it to attach files
I am having a problem with my query. I want to use SUM in
I have a problem, I have a saved text file, I want to use

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.