advertisement
Login | Register   
  Include Code  Search Tips
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   TIP BANK
Browse DevX
Partners & Affiliates
advertisement
advertisement
Tip of the Day
Expertise: Intermediate
Language: .NET
June 8, 2009
Create a Popup Calendar in ASP.NET

This example assumes the main page from which users will pop up the calendar is named Calender.aspx. The following procedure shows how to create the popup calendar:

  1. In Calendar.aspx, add these controls:
  2. <INPUT type="button" value="Pick"
    onclick="PopupPicker('DateTextBox', 250, 250);">
    <asp:linkbutton ID="Linkbutton1" runat="server"
    OnClientClick="PopupPicker('TextBox1',
    250, 250)">LinkButton</asp:linkbutton>
    
  3. Create a TextBox to display the selected date:
  4. <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
    
  5. Place the following JavaScript function in the Calendar.aspx page:

  6. It's quick, easy and you get access to all the articles on DevX.
    This registration/login is to allow you to read articles on devx.com.
    Already a member?





    Anmol Gupta
    If you have a hot tip and we publish it, we'll pay you. However, due to accounting overhead we no longer pay $10 for a single tip submission. You must accumulate 10 acceptable tips to receive payment. Be sure to include a clear explanation of what the technique does and why it's useful. If it includes code, limit it to 20 lines if possible. Submit your tip here.
advertisement
advertisement