calendar and database

1. when the page is onload, i want to automatically show the current month and next month calender. Is it possible to do that?

2. Inside of the calendar, I would like to show some data and the data comes from the sql server. How to do that? like it will be select checkout car from cars where date = 01/01/2014. so 01/01/2014 in the calender will show the car name and etc.

3. Inside of the calender, I would like to block some date ranges and  the data domes from sql database server as well. is it possible?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
I don't know how to do this specifically on .net.  I do use fullcalendar

<link rel='stylesheet' type='text/css' href='fullcalendar.css' />
<script type='text/javascript' src='jquery.js'></script>
<script type='text/javascript' src='fullcalendar.js'></script>
$(document).ready(function() {

    // page is now ready, initialize the calendar...

        // put your options and callbacks here

<div id='calendar'></div>

Open in new window

You simply need to create a json feed via your .net

There is a good learning curve and if you understand js/jquery it is easier.  It did take me a few times using to wrap my head around all it offers but it has a lot of great built in features.  It is also free.

Kendo has .NET wrappers but the entire shabang will set you back $1000.
CoolDev2014Author Commented:
good free option. But need some experts telling me how to do it xml.
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
You can use an xml fee
    events: function(start, end, callback) {
            url: 'myxmlfeed.php',
            dataType: 'xml',
            data: {
                // our hypothetical feed requires UNIX timestamps
                start: Math.round(start.getTime() / 1000),
                end: Math.round(end.getTime() / 1000)
            success: function(doc) {
                var events = [];
                $(doc).find('event').each(function() {
                        title: $(this).attr('title'),
                        start: $(this).attr('start') // will be parsed

Open in new window

If you want to select a day or event such
    dayClick: function(date, allDay, jsEvent, view) {

        if (allDay) {
            alert('Clicked on the entire day: ' + date);
            alert('Clicked on the slot: ' + date);

        alert('Coordinates: ' + jsEvent.pageX + ',' + jsEvent.pageY);

        alert('Current view: ' +;

        // change the day's background color just for fun
        $(this).css('background-color', 'red');


Open in new window

This gives the similar look and fee of google calendar except you are using your own data source that you control.
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

CoolDev2014Author Commented:
thank. assume i built a web service and serving soap with xml. How to parse there in js?
I need some example. Thanks
CoolDev2014Author Commented:
with please.
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
ASP runs on the server, javascript/jquery run on the client so the two do not meet.

On line 4 http:#a39894523 you just need to switch out the url with your own url

Lines 8 & 9 are the data you are sending.  The end result is the same as myxmlfeed.php?start=1393799271&end= 1393885664000.  You can send the date time in any format you want, the sample is in unix time.  However, your date/time you send back needs to be in unix time. If that is not possible, you can convert it on line 16 using javascript

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.