Solved

calendar

Posted on 2013-06-04
7
24 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
ID: 39221279
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
ID: 39222230
thanks, but i did find solution to the calendar control in much better way.
0
 

Author Comment

by:skbhagat35
ID: 39224310
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
ID: 39225580
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

912 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

23 Experts available now in Live!

Get 1:1 Help Now