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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T06:18:00+00:00 2026-05-13T06:18:00+00:00

I want to combine a textbox and several validator controls into 1 usercontrol. Is

  • 0

I want to combine a textbox and several validator controls into 1 usercontrol.
Is this possible with the intent to keep some fields dynamic like

textbox:cssclass
textbox:id
textbox:width

I’m asking this because i find myself putting a lot of validator controls
for every (same textbox type) field in my form and it’s getting kinda messy.

Kind regards,
Mark

  • 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-13T06:18:00+00:00Added an answer on May 13, 2026 at 6:18 am

    Build your usercontrol with properties that pass through to the textboxes. So for example, you’d include your ascx like:

    <cc1:MyUserControl runat="server" TextBoxWidth="50" 
         TextBoxId="txtID" TextBoxCssClass="class" />
    

    In the code for your user control, simply create these properties:

    public int TextBoxWidth { get; set; }
    public string TextBoxID { get; set; }
    public string TextBoxCssClass { get; set;}
    

    And in the code somewhere, pass the properties through to your textbox control. PreRender would be a good place to do it.

    ...
      myTxtControl.Width = this.TextBoxWidth;
      myTextControl.ID = this.TextBoxID;
      myTextControl.CssClass = this.TextBoxCssClass;
    ...
    

    where myTextControl is the textbox that your usercontrol contains.

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

Sidebar

Related Questions

I want to combine several PDFs into one by appending the pages of each
I want to combine these two queries into one: mysql_query(INSERT INTO categories (name, parent)
In a table I want to combine some of the columns, but not in
I want to combine two ggplots, from two different data.frames, into one plot. Below
I want to combine multiple lists of items into a single list, retaining the
I want to combine combine fields from an input .csv file for output to
I want to combine two arrays like this: 1st array: array( ATTENDED => 1,
I want to combine 2 tables into one. Let say I have: Table1 ID
I have the following code and I want to combine phase space plots into
I want to combine two LambdaExpressions without compiling them. This is what it looks

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.