Solved

calendar

Posted on 2013-06-04
7
21 Views
Last Modified: 2016-08-14
Hi, I am new to the developing aspx page, I have created an aspx page and have everything needed now there is a calendar icon which i want to use as calendar control. Now how do i use the given calendar in the toolbox to link to the icon and use that icon as calendar control.
0
Comment
Question by:skbhagat35
  • 3
7 Comments
 
LVL 78

Expert Comment

by:David Johnson, CD, MVP
Comment Utility
not sure what you mean....

open a new page
drag a calendar control onto the page and underneath it put a label (blank out the text in the label)

double click on the calendar which will bring up the event box (code behind)

 
 Protected Sub Calendar1_SelectionChanged(sender As Object, e As System.EventArgs) Handles Calendar1.SelectionChanged
        Label1.Text = Calendar1.SelectedDate

Open in new window


Press Ctrl-F5 to run the webpage.. As you change the date the label text will reflect the date selected.

http://www.screencast.com/t/ZKveoGLdJKD
0
 

Author Comment

by:skbhagat35
Comment Utility
thanks, but i did find solution to the calendar control in much better way.
0
 

Author Comment

by:skbhagat35
Comment Utility
I've requested that this question be closed as follows:

Accepted answer: 0 points for skbhagat35's comment #a39222230

for the following reason:

I learned the solution by myself after much research
0
 

Accepted Solution

by:
skbhagat35 earned 0 total points
Comment Utility
I was trying to link the calender contol to a image botton and so i was finding it difficult to do it and therefore put a question in this forum, but i resolved it by doing this

i took textbox and imagebutton from the tool box, then calender cotrol was dragged to link the image in design mode change the visible property of calendar to false, then put a function to imagebutton as

protected void FromDateImage_Click(object sender, ImageClickEventArgs e)
    {
        if (Calendar1.Visible)
        {
            Calendar1.Visible = false;
        }
        else
        {
            Calendar1.Visible = true;
        }
    }

and it started working also did some more stuffs with calendar like on to select date to the text box i used the following code
 
protected void Calendar1_SelectionChanged(object sender, EventArgs e)
   {
        FromDate.Text = Calendar1.SelectedDate.ToShortDateString();
        Calendar1.Visible = false;
    }

changed some properties of calendar and so on,
Hence i resolved my problem
thanks
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now