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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T10:58:09+00:00 2026-05-12T10:58:09+00:00

I do not like to use the calendar from .NET, so I would like

  • 0

I do not like to use the calendar from .NET, so I would like to have one Web User Control with 3 drop down boxes, day, month, year. [CODE DONE].

I want to be able to call this Control and initialize it with start year and end year, and with or without selected date.[CODE DONE].

This control will see if there is one valid date selected and return bool [CODE DONE].

Then in my web page I would like to able to see if that web user control is valid, in a way that I can use with the normal .NET validation (associate one required field), the problem is that I don’t know where to put this code and retrieve it to the validation control on the web page. [CODE NOT DONE].

How can I do this?

  • 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-12T10:58:09+00:00Added an answer on May 12, 2026 at 10:58 am

    There are two steps to integrating your custom server controls with the validation framework.

    (1) Server side: you’ll need to add a ValidationPropertyAttribute to your class, so the validation framwework knows what to look at when validating:

    [ValidationProperty("SelectedDate")]
    public class MyDateControl : WebControl
    {
        public DateTime? SelectedDate { get { ... } set { ... } }
    } 
    

    (2) To hook up with client side validation, you have to make sure there’s an input tag associated with your control. One way of doing that is rendering an <input type=”hidden”> as the first child tag of your web control’s HTML. The validation framework will pick up on that. The remaining thing to do here, is to set this hidden field through JavaScript each time your one drop downs changes.

    This way, you can tie in with the existing validation controls. If you want different way to validate, you should look at a CustomValidator.

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

Sidebar

Related Questions

I would like to use VB9 but am not sure what syntax to use
I would like to use standard icons in treeview but I am not sure
I would like to know a few practical use-cases (if they are not related/tied
When should I not use the ThreadPool in .Net? It looks like the best
Seems that requirements on safety do not seem to like systems that use AI
Maybe I'm not looking in the right places but I'd like to use SQL
I'm not even sure, for example, if I can use it like a normal
If for example I should not use standard library functions like printf() , putchar()
I'd like to query WMI for WCF service information, but I'd rather not use
i would like to know how to fetch all events from an EventStore using

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.