Calendar Control & Client-Side Functionality

Discussion in 'ASP .Net Web Controls' started by Alex Maghen, May 16, 2006.

  1. Alex Maghen

    Alex Maghen Guest

    Hi. I want to use the nice "Calendar" control (<asp:Calendar>) but I want to
    use it to populate a TextBox on the client-side without doing a server
    round-trip. Is this possible with this control? If so, how do I do it?

    Alex
     
    Alex Maghen, May 16, 2006
    #1
    1. Advertising

  2. Hi Alex,

    Thank you for posting.

    As for the ASP.NET Calendar control, so far it is still concentrating on
    server-side processing, and there hasn't pure client-side based interfaces
    to let us manipulate it at client-side(like AJAX ...). Also for your
    scenario, you want to populate a textbox with date value supplied in
    Calendar control, generally we will need to use two separate pages to do
    it. One page is the main page which contains the textbox, and another is a
    page contains the Calendar and this page will be opened as a popup page to
    let user select Date. Here is a web article which has mentioned this
    approach:

    http://www.mikepope.com/blog/DisplayBlog.aspx?permalink=501&count=no

    Also, based on my review on the article, there is one place we need to
    change. Since the Calendar control will still postback when selected Date
    changes, we need to use server code to embeded the new selected value into
    client script. e.g:

    ==============
    <script language=javascript>
    window.opener.document.all[control].value = '<%=
    Calendar1.SelectedDate.ToString()%>'
    window.close();

    </script>
    ==============

    BTW, if you do need pure client-side based approaches, there exists some
    3rd party calendar or web based DateTimePicker controls available. You can
    try searching in the www.asp.net or codeproject ...

    Hope this helps.

    Regards,

    Steven Cheng
    Microsoft Online Community Support


    ==================================================

    When responding to posts, please "Reply to Group" via your newsreader so
    that others may learn and benefit from your issue.

    ==================================================


    This posting is provided "AS IS" with no warranties, and confers no rights.



    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)
     
    Steven Cheng[MSFT], May 16, 2006
    #2
    1. Advertising

  3. Hi Alex,

    Does the info in my last reply helps you some on this issue? If there's
    still anything we can help, please feel free to post here.

    Regards,

    Steven Cheng
    Microsoft Online Community Support


    ==================================================

    When responding to posts, please "Reply to Group" via your newsreader so
    that others may learn and benefit from your issue.

    ==================================================


    This posting is provided "AS IS" with no warranties, and confers no rights.



    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)
     
    Steven Cheng[MSFT], May 18, 2006
    #3
    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. Mark Goldin

    DataGrid with client side functionality

    Mark Goldin, Feb 28, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    982
    Martha[MSFT]
    Feb 28, 2004
  2. Boss302
    Replies:
    0
    Views:
    1,051
    Boss302
    Nov 21, 2006
  3. Angel Of Death
    Replies:
    2
    Views:
    571
    Angel Of Death
    Oct 2, 2006
  4. Bogdan
    Replies:
    2
    Views:
    655
    Bogdan
    Jun 9, 2008
  5. Zoe Hart
    Replies:
    1
    Views:
    371
    Scott Wisniewski
    Jan 8, 2004
Loading...

Share This Page