473,670 Members | 2,419 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Pass the selected date from a calendar in a querystring - .net 2005 b2

We are trying to pass the selected date from a .net calendar in a
querystring. We manage to display the selected date from the calendar in a
Lable like this :

protected void Calendar1_Selec tionChanged(obj ect sender, EventArgs e)
{
lblDate.Text = Calendar1.Selec tedDate.ToShort DateString();
}

<asp:Label ID="lblDate" runat="server"> </asp:Label>

What we are trying to accomplish is to pull the above value of the lable
which is "lblDate" to the following link and pass is as a querystring

<a href='default5. aspx?tech=<%# Eval("RESPONS")
%>&amp;today=se lected_date'><s pan style="font-size: 10px">Link
Name</span></a><br />

thnx

Nov 19 '05 #1
1 1641
protected void Calendar1_Selec tionChanged(obj ect sender, EventArgs e)
{
lblDate.Text = Calendar1.Selec tedDate.ToShort DateString();
litDate.Text = Calendar1.Selec tedDate.ToShort DateString();

}

<asp:Label ID="lblDate" runat="server"> </asp:Label>
<a href='default5. aspx?tech=<asp: Literal ID="litDate"
runat="server"/>amp;today=sele cted_date'><spa n style="font-size: 10px">Link
Name</span></a><br />
Or just use HyperLink WebControl and fill NavigateUrl property with correct
data.
--
C# Dev
"Chanaka" wrote:
We are trying to pass the selected date from a .net calendar in a
querystring. We manage to display the selected date from the calendar in a
Lable like this :

protected void Calendar1_Selec tionChanged(obj ect sender, EventArgs e)
{
lblDate.Text = Calendar1.Selec tedDate.ToShort DateString();
}

<asp:Label ID="lblDate" runat="server"> </asp:Label>

What we are trying to accomplish is to pull the above value of the lable
which is "lblDate" to the following link and pass is as a querystring

<a href='default5. aspx?tech=<%# Eval("RESPONS")
%>&today=select ed_date'><span style="font-size: 10px">Link
Name</span></a><br />

thnx


Nov 19 '05 #2

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

Similar topics

7
3976
by: Mick White | last post by:
According to the Safari browser the world began on "Fri Dec 13 1901 15:45:52 GMT-0500", but I need to be able to get around this limitation. I am interested in dates from 1500 to 1901, as far as I can determine, there are 14 possible calendar variations. Year starts on Sun, Mon..... Leap year starts on Sun, Mon.. I can label these early year "types" as a number between 0 and 13.
9
2629
by: Thomas R. Hummel | last post by:
Hello, I am importing data that lists rates for particular coverages for a particular period of time. Unfortunately, the data source isn't very clean. I've come up with some rules that I think will work to clean the data, but I'm having trouble putting those rules into efficient SQL. The table that I'm dealing with has just under 9M rows and I may need to use similar logic on an even larger table, so I'd like something that can be made...
4
4800
by: tom | last post by:
Hi Experts, I want to pass the selectedDate value from my calender form to another web form or a web user control. Could you please show me how to do this? Thanks in advance.
0
1435
by: Michael England | last post by:
I'm having trouble with the Calendar control in ASP.NET using VB. When I place a calendar on a page and then select a new date, it seems that I have to select the date twice in order for any content on the page to be updated that depends on the selected date. The calendar itself updates correctly (the selected date is highlighted) but the other content on the page stays the same until the date is selected a second time. I'm not sure...
2
1946
by: mg | last post by:
When I click any date in System.Web.UI.WebControls.Calendar (C# WebForm), the SelectionChanged event handler fires. If I next click on the same date again, this event handler does not fire, so I can't get the selected date directly from the calendar on two successive attempts How can I get this same selected date from the calendar on two successive attempts. Storing the value obtained on the first attempt isn't helpful.
1
1222
by: Chanaka | last post by:
We are trying to pass the selected date from the .net calendar in a querystring.
1
2185
by: TB | last post by:
Hi All: A kind soul provided by with the code for very nice calendar popup, which all in all works fine execpt for one thing: If I pick the current date (i.e. today's date) then the pop-up does not close and the date value is returned to the target textbox. With any other date, everything works flawlessly. Since I don't to post a lot of code here, initially I will only list the what is in the calendarpopup.aspx.vb:
5
2657
by: Mark Olbert | last post by:
I just noticed something weird about the calendar control in ASPNET2. If you assign a value to SelectedDate that has a time component (e.g., 3/1/2007 10:37 AM), and you have a custom style for the selected day, the selected day will not be rendered using the custom style. Instead, the control acts like >>no<< date has been selected. I came across this when doing a SelectedDate='<%# Bind("date_field") %>', where the date_field is a datetime...
1
2052
by: EyeHawk | last post by:
OK, hopefully somebody can help me out again. My next problem is updating 3 form fields (type list/menu option) that correspond to a date, one for month, one for day and one for year when the user selects a date for a javascript calendar solution. Introduction The reason I don’t want to use a text field, is because the website I’m developing is in Spanish and as you probably know, the Spanish format for the dates is dd/mm/yy, but I just...
0
8386
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
8814
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8592
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8661
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...
0
5684
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
4211
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
4391
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2800
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
1794
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.