Calendar popup - using ASP textbox instead of HTML textbox

Discussion in 'ASP .Net' started by =?Utf-8?B?Q2hyaXM=?=, Mar 29, 2005.

  1. I am trying to use a calendar popup to populate a date in a textbox. I am
    using the example described in this article:

    http://aspnet.4guysfromrolla.com/articles/030202-1.aspx

    However, this article uses a regular HTML input box, and I need to use an
    ASP Web control textbox. When the latter is rendered in the browser, some
    extra stuff like _ctl0 is added to the name of the textbox. So the calendar
    can't find the box to populate it.

    Can you tell me how to modify the example in this article to work with an
    ASP textbox instead of the input box? How do you know in advance what ASP is
    going to name the text box?

    Many thanks
     
    =?Utf-8?B?Q2hyaXM=?=, Mar 29, 2005
    #1
    1. Advertising

  2. =?Utf-8?B?Q2hyaXM=?=

    Lucas Tam Guest

    Lucas Tam, Mar 30, 2005
    #2
    1. Advertising

  3. =?Utf-8?B?Q2hyaXM=?=

    Alex Guest

    I think I have come across something similar. If you are creating controls
    dynamically you cannot get the actual name of the control until prerender.
    What I would suggest doing is overriding your OnPreRender event and
    determining the name of the control you need. There are a few ways to do
    this. Perhaps this article will help.

    http://muellerdesigns.net/DasBlog/PermaLink.aspx?guid=67fe7790-8173-4649-b127-2b227c921d7f

    --
    Alex Mueller

    "Chris" <> wrote in message
    news:D...
    > I am trying to use a calendar popup to populate a date in a textbox. I am
    > using the example described in this article:
    >
    > http://aspnet.4guysfromrolla.com/articles/030202-1.aspx
    >
    > However, this article uses a regular HTML input box, and I need to use an
    > ASP Web control textbox. When the latter is rendered in the browser, some
    > extra stuff like _ctl0 is added to the name of the textbox. So the

    calendar
    > can't find the box to populate it.
    >
    > Can you tell me how to modify the example in this article to work with an
    > ASP textbox instead of the input box? How do you know in advance what ASP

    is
    > going to name the text box?
    >
    > Many thanks
    >
    >
     
    Alex, Mar 30, 2005
    #3
  4. =?Utf-8?B?Q2hyaXM=?=

    Peter Blum Guest

    I also make a popular DatePicker, "Peter's Date Package"
    (http://www.peterblum.com/datecontrols/home.aspx). When I see people trying
    to build their own, they usually don't realize that some very good ones are
    already done and either cheap (like mine) or free.

    Take a look through this thread: http://forums.asp.net/815867/ShowPost.aspx.
    I give a number of reasons I rewrote my own calendar to stop using the popup
    window and start using a javascript calendar.

    --- Peter Blum
    www.PeterBlum.com
    Email:
    Creator of "Professional Validation And More" at
    http://www.peterblum.com/vam/home.aspx

    "Chris" <> wrote in message
    news:D...
    >I am trying to use a calendar popup to populate a date in a textbox. I am
    > using the example described in this article:
    >
    > http://aspnet.4guysfromrolla.com/articles/030202-1.aspx
    >
    > However, this article uses a regular HTML input box, and I need to use an
    > ASP Web control textbox. When the latter is rendered in the browser, some
    > extra stuff like _ctl0 is added to the name of the textbox. So the
    > calendar
    > can't find the box to populate it.
    >
    > Can you tell me how to modify the example in this article to work with an
    > ASP textbox instead of the input box? How do you know in advance what ASP
    > is
    > going to name the text box?
    >
    > Many thanks
    >
    >
     
    Peter Blum, Mar 30, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Stephajn Craig

    Javascript PopUp using Calendar Control

    Stephajn Craig, Jul 22, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    657
    Saravana
    Jul 23, 2003
  2. Merex

    Using Calendar as a popup

    Merex, Aug 7, 2003, in forum: ASP .Net
    Replies:
    5
    Views:
    1,292
    Merex
    Aug 11, 2003
  3. dapkniht
    Replies:
    1
    Views:
    1,366
    Eliyahu Goldin
    Mar 8, 2006
  4. Jens Peter Hansen
    Replies:
    7
    Views:
    572
    Randy Webb
    Jun 19, 2004
  5. Alex  Lee

    google calendar -- popup textbox entry

    Alex Lee, Jun 22, 2006, in forum: Javascript
    Replies:
    2
    Views:
    200
    Alex Lee
    Jun 22, 2006
Loading...

Share This Page