473,379 Members | 1,253 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

Use Calendar control without postback to Server?

Hi all,

Just wondering. I am converting an ASP application to ASP.NET 2.0. The ASP
version used a JavaScript Calendar that would pop up on the client side and
populate various text fields with the selected date. Very cool. I am trying
to emulate that behavior with the ASP.NET Calendar control, but it seems to
require a call back to the server (postback) to actually populate a textbox.
I can see how that would take a while for a dial-up connection. Even using
my local IIS server I can see a delay during refresh. Is there anyway to use
an ASP.NET calender in the browser without requiring a postback?

Considering that ASP.NET is much more advanced than "legacy" ASP, I am
guessing there must be a way to do this. Maybe I am trying to use the wrong
control or don't yet understand all it's capabilities.

Does anyone have any input on this or maybe can point me to a resource
describing such a use?

Thanks muchly for any help with this....

Mar 11 '07 #1
3 3673
"John Kotuby" <jo***@powerlist.comwrote in message
news:OK**************@TK2MSFTNGP05.phx.gbl...
Considering that ASP.NET is much more advanced than "legacy" ASP,
It certainly is.
I am guessing there must be a way to do this.
Not natively... You can use Ajax / Anthem which will allow you to use the
<asp:Calendarcontrol without a postback, but it will still use a callback
which involves a round trip to the server and back...
Maybe I am trying to use the wrong control
You are if you are looking for a completely client-side solution...
point me to a resource describing such a use?
There isn't one...

Begs the question, though, why not continue to use your JavaScript date
picker...?
Mar 11 '07 #2
Thanks Mark...

I was hoping that ASP.NET had another solution, but if the J in AJAX refers
to JavaScript then JS is not considered legacy. I was having trouble getting
the call to the DatePicker to work correctly. But you already know that
since you were trying to help me with that....which I appreciate.
>Hmm - you might be able to fix it by escaping one of the pairs of quotes
e.g. \'.....\'

Another option, though a bit of a kludge, might be something like:

var objCreateDate =
document.getElementById('<%=txtCreateDate.ClientID %>');
href="show_calendar(objCreateDate)";
I had since discovered a way to get the Calendar control to "pop up" over
the other controls using CSS
Style="visibility:hidden; position:absolute; top:40%; left:30%" and then
changing the visibility attribute upon click of the anchor element. A
discovery for me since I have been programming almost excusively in VB6 and
SQL 2000 for the last 5 years. Lot's of new disciplines to learn for web
applications.

But if I'm even going to consider asynchonous call backs or get proficient
at what used to be called DHTML, then I had better get my JS skills in gear.

Your dedication to this newsgroup is impressive. I tried answering someone
else's question with a code example of my own and found out what type of
effort that takes. Especially when deadlines loom.

OK, back to the drawing board...

Have a good evening,

"Mark Rae" <ma**@markNOSPAMrae.comwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
"John Kotuby" <jo***@powerlist.comwrote in message
news:OK**************@TK2MSFTNGP05.phx.gbl...
>Considering that ASP.NET is much more advanced than "legacy" ASP,

It certainly is.
>I am guessing there must be a way to do this.

Not natively... You can use Ajax / Anthem which will allow you to use the
<asp:Calendarcontrol without a postback, but it will still use a
callback which involves a round trip to the server and back...
>Maybe I am trying to use the wrong control

You are if you are looking for a completely client-side solution...
>point me to a resource describing such a use?

There isn't one...

Begs the question, though, why not continue to use your JavaScript date
picker...?



Mar 12 '07 #3
"John Kotuby" <jo***@powerlist.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
I was hoping that ASP.NET had another solution, but if the J in AJAX
refers to JavaScript then JS is not considered legacy.
Indeed not... Powerful though ASP.NET is, its main function remains the
creation and output of markup to be streamed to a client browser, and
JavaScript is still an extremely important part of that... And the 'J' in
AJAX does indeed refer to JavaScript... :-)
But if I'm even going to consider asynchonous call backs or get proficient
at what used to be called DHTML, then I had better get my JS skills in
gear.
Absolutely!
Mar 12 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Colin Young | last post by:
I have a UserControl that contains a calendar control. The calendar is not raising events (month navigation, date selections, etc.). I've checked that the OnSelectionChanged event has a handler...
2
by: Chuck Hartman | last post by:
I've been trying to add an ImageButton object to a Calendar table cell, but so far I am unable to handle the Command event from that button in my form's code behind. Below is an example of what I...
1
by: C. Stadther | last post by:
Why is it all controls with an Autopostback feature report their values in the Page Load, but the calendar control's selecteddate value doesn't change till it hits the Selection_Changed Event. Is...
2
by: VB Programmer | last post by:
How can I force the DayRender event of my Calendar to run/refresh? The calendar displays data from a database and I am allowing the user to filter out what data they see on the calendar. When...
0
by: Robert Ladd | last post by:
Hi, I'm trying to disable the asp.net calendar control from a javascript function, but it doesn't disable the doPostBack. To simplify the situation, assume a page with 4 controls. A...
2
by: Sathyaish | last post by:
I notice the calendar control in ASP.NET does not have an AutoPostBack property. I want that when I select a date from the control, the control must *not* post back the page. How do I do that?
2
by: Antoine | last post by:
Hi I want to avoid postback on a calendar. I have a .NET calendar control in asp.net. Ideally I would like to remove any indication of the postback fore/back months. It sucks. I would like to...
2
by: serge calderara | last post by:
Dear all, I have a webform with a calendar control on it. When loaded the calendar is set to the current date. Depending on a criteria from a database field, calendar day cell appears with red...
3
by: =?Utf-8?B?UGFycm90?= | last post by:
I applied the following Ajax code in my web page which has a calendar control to keep my page from completely reloading everytime something was changed. <atlas:ScriptManager ID="ScriptManager1"...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.