473,804 Members | 2,271 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3699
"John Kotuby" <jo***@powerlis t.comwrote in message
news:OK******** ******@TK2MSFTN GP05.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:Calendarco ntrol 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.getEle mentById('<%=tx tCreateDate.Cli entID%>');
href="show_cale ndar(objCreateD ate)";
I had since discovered a way to get the Calendar control to "pop up" over
the other controls using CSS
Style="visibili ty:hidden; position:absolu te; 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**@markNOSPA Mrae.comwrote in message
news:%2******** ********@TK2MSF TNGP06.phx.gbl. ..
"John Kotuby" <jo***@powerlis t.comwrote in message
news:OK******** ******@TK2MSFTN GP05.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:Calendarco ntrol 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***@powerlis t.comwrote in message
news:%2******** ********@TK2MSF TNGP04.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
2697
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 being registered. Is there anything else obvious or otherwise that I've missed? Is there a problem using it in a UserControl? Thanks Colin
2
3644
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 am trying to do. The ImageButton that is on the form handles its Command event just fine, but the ImageButton that is added to the cell does not handle the event. Am I doing something wrong, or is not possible to add server controls to a calendar...
1
1442
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 there anyway around this? My issue stems from a page that contains a user custom webcontrol that accepts the currently selected date from a calendar control, yet it is always 1 click behind. I have other custom webcontrols that accept input form...
2
4576
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 they click "Update Calendar" I want to force the DayRender events to reprocess. I don't want to simply do a response.redirect to the page. Thanks.
0
3367
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 dropdownlist, a calendar control, a textbox and an update button. What I'm doing is initially setting the button to disabled, the other 3 controls are enabled. If any data is entered in the textbox, I want to disable the dropdownlist and the calendar...
2
6946
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
8301
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 control that off another, smaller popup style java cal but permanetetly in place. Anyone done that? I already have a sample javascript of choice, I just am not sure how they
2
1905
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 background color for the selected month. This is done by using the Calendar_DayRender event. This works fine What I need to do next is that if my user click on either the NextMonth or PrevMonth, I should get the same behaviour for day cells...
3
2636
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" runat="server" EnablePartialRendering="true"/> <atlas:UpdatePanel runat="server" ID="UpdatePanel1" Mode="Conditional"> <ContentTemplate> After inserting this code, my calendar stopped working in that if I clicked on a date, nothing would...
0
9594
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10599
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10090
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7635
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6863
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5531
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5673
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4308
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3832
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.