473,473 Members | 2,213 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How do I allow them to choose a date WITHOUT a postback?

Hello,

I have an app where the user needs to fill in details about an event,
including the date and time of the event. I want a clean way to allow
them to pick the date and time. In the old days (ASP Classic), I would
have used three comboboxes for the date, one for the day, one for the
month and one for the year. I'm sure ASP.NET has a better way of doing
it. I have seen the calendar control, but all the examples I have seen
involve a postback as soon as you click anything on the calendar. I
don't want that, I want them to be able to pick a date whilst they are
filling in the form and then click a button when they are done to post
the info back to the server.

Anyone any suggestions how I would do this? TIA

--
Alan Silver
(anything added below this line is nothing to do with me)
Nov 19 '05 #1
3 1881
Check out this article, here you wont do a postback when you want to show a
calendar. Instead you will open a new window where you can show a calendar.
http://www.microsoft.com/india/msdn/...ndarinASP.aspx

--
-Saravana
http://dotnetjunkies.com/WebLog/saravana/
www.ExtremeExperts.com

"Alan Silver" <al*********@nospam.thanx> wrote in message
news:30**************@nospamthankyou.spam...
Hello,

I have an app where the user needs to fill in details about an event,
including the date and time of the event. I want a clean way to allow
them to pick the date and time. In the old days (ASP Classic), I would
have used three comboboxes for the date, one for the day, one for the
month and one for the year. I'm sure ASP.NET has a better way of doing
it. I have seen the calendar control, but all the examples I have seen
involve a postback as soon as you click anything on the calendar. I
don't want that, I want them to be able to pick a date whilst they are
filling in the form and then click a button when they are done to post
the info back to the server.

Anyone any suggestions how I would do this? TIA

--
Alan Silver
(anything added below this line is nothing to do with me)

Nov 19 '05 #2
Create a simple page, Calendar.aspx, that has a calendar on it. I believe
you can use the asp calendar control.

Open the Calendar.aspx as a modal dialog. Take the return value from the
Calendar.aspx and put it into the text box.

<input type="text" id="txtDate" name="txtDate" />
<button value="lookup" onclick="document.all['txtDate'].value =
window.showModalDialog( 'Calendar.aspx' );" >

Or something along those lines.

bill

"Alan Silver" <al*********@nospam.thanx> wrote in message
news:30**************@nospamthankyou.spam...
Hello,

I have an app where the user needs to fill in details about an event,
including the date and time of the event. I want a clean way to allow
them to pick the date and time. In the old days (ASP Classic), I would
have used three comboboxes for the date, one for the day, one for the
month and one for the year. I'm sure ASP.NET has a better way of doing
it. I have seen the calendar control, but all the examples I have seen
involve a postback as soon as you click anything on the calendar. I
don't want that, I want them to be able to pick a date whilst they are
filling in the form and then click a button when they are done to post
the info back to the server.

Anyone any suggestions how I would do this? TIA

--
Alan Silver
(anything added below this line is nothing to do with me)

Nov 19 '05 #3
Thanks to both of you, that seems quite sensible.
Create a simple page, Calendar.aspx, that has a calendar on it. I believe
you can use the asp calendar control.

Open the Calendar.aspx as a modal dialog. Take the return value from the
Calendar.aspx and put it into the text box.

<input type="text" id="txtDate" name="txtDate" />
<button value="lookup" onclick="document.all['txtDate'].value =
window.showModalDialog( 'Calendar.aspx' );" >

Or something along those lines.

bill

"Alan Silver" <al*********@nospam.thanx> wrote in message
news:30**************@nospamthankyou.spam...
Hello,

I have an app where the user needs to fill in details about an event,
including the date and time of the event. I want a clean way to allow
them to pick the date and time. In the old days (ASP Classic), I would
have used three comboboxes for the date, one for the day, one for the
month and one for the year. I'm sure ASP.NET has a better way of doing
it. I have seen the calendar control, but all the examples I have seen
involve a postback as soon as you click anything on the calendar. I
don't want that, I want them to be able to pick a date whilst they are
filling in the form and then click a button when they are done to post
the info back to the server.

Anyone any suggestions how I would do this? TIA

--
Alan Silver
(anything added below this line is nothing to do with me)



--
Alan Silver
(anything added below this line is nothing to do with me)
Nov 19 '05 #4

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

Similar topics

3
by: Bruno BAGUETTE | last post by:
Hello, I'm looking for a way to convert a unix timestamp to a PostgreSQL date without using ::abstime which seems to be deprecated. Currently, I do that query : levure=> select...
1
by: ashfaq Gul via DotNetMonster.com | last post by:
Please help me.... i want to update record in datagrid without postback ....and the main thing that the confirmation of record updation should be from server not client ...because overwritting...
1
by: John Mason | last post by:
Hi, I am trying to figure out how to do a client-side calculation based on textbox values, using asp.net, without performing a postback. I have 2 textboxes... <asp:textbox runat="server"...
9
by: Martin Randall | last post by:
Can anyone tell me if it is possible to get the TreeView control in ASP.Net 2.0 to allow node selection without triggering a postback? Thanks! Martin Randall
3
by: vinay | last post by:
Hi All I have a page in which i using user control .on user control i using javascript to pop up a message .when i choose wrong date in user control & submits the page it alerts the message of...
26
by: JJ | last post by:
Is there any way you can expand a parent node on the treeview control _without a postback_ by clicking on the node text (NOT clicking the expand image URL) ? I want to format the treeview node...
1
by: Tor Inge Rislaa | last post by:
I am using a DropDownList in my web page. I simply need to put the text of the selected index into a sql query, when the user click a save button. The problem is that the change of text in the...
2
by: wildman | last post by:
RE: Gridview textbox has data check without postback.. javascript? I have a gridview with a textbox. I can set the textbox to autopostback and check for a value in a prerender event to decide if...
2
by: Anisht79menon | last post by:
I want to convert a DATE with time stamp(stored in a column of a table of data type as DATE ) to a DATE without time stamp. I have a constraint also, I can't use TO_CHAR function. Example. ...
2
by: kirankumarn | last post by:
I want to use Client-Callback without postback what is the advantages & how i can use. Thanks in advance
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...
0
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 ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.