473,839 Members | 1,470 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can Calendar Control days be hyperlinks?

When someone clicks on a day in my Calendar control I want to postback
to the same page but with information in a querystring, different for
each day. Rather than posting back twice by using its SelectionChange d
event I want to do it the first time.

I've tried adding links and javascript in the Calendar's DayRender event
like this:
string x = "<a href=\"default. aspx?topic=" +
ViewState["topic"].ToString() +
"date=" + myDate + "</a>";

e.Cell.Attribut es.Add("OnClick ", x);
But maybe I'm just not doing it right.

It seems in the 1.0 Framework that the Calendar controls will postback
first (to the same page) no matter what. Is there a way I can change
the querystring on the client side?

Thanks for your help.
Nov 18 '05 #1
4 2011
do you want just the day text to be a link or the entire cell to be a link?
"Bruce W..1" <br***@noDirect Email.com> wrote in message
news:3F******** *******@noDirec tEmail.com...
When someone clicks on a day in my Calendar control I want to postback
to the same page but with information in a querystring, different for
each day. Rather than posting back twice by using its SelectionChange d
event I want to do it the first time.

I've tried adding links and javascript in the Calendar's DayRender event
like this:
string x = "<a href=\"default. aspx?topic=" +
ViewState["topic"].ToString() +
"date=" + myDate + "</a>";

e.Cell.Attribut es.Add("OnClick ", x);
But maybe I'm just not doing it right.

It seems in the 1.0 Framework that the Calendar controls will postback
first (to the same page) no matter what. Is there a way I can change
the querystring on the client side?

Thanks for your help.

Nov 18 '05 #2
Have you tried setting the Text property of the cell in the DayRender to be
your HTML?

"Bruce W..1" <br***@noDirect Email.com> wrote in message
news:3F******** *******@noDirec tEmail.com...
When someone clicks on a day in my Calendar control I want to postback
to the same page but with information in a querystring, different for
each day. Rather than posting back twice by using its SelectionChange d
event I want to do it the first time.

I've tried adding links and javascript in the Calendar's DayRender event
like this:
string x = "<a href=\"default. aspx?topic=" +
ViewState["topic"].ToString() +
"date=" + myDate + "</a>";

e.Cell.Attribut es.Add("OnClick ", x);
But maybe I'm just not doing it right.

It seems in the 1.0 Framework that the Calendar controls will postback
first (to the same page) no matter what. Is there a way I can change
the querystring on the client side?

Thanks for your help.

Nov 18 '05 #3
Brian Henry wrote:

do you want just the day text to be a link or the entire cell to be a link?

=============== =============== =============== ============

Either would be fine.
Nov 18 '05 #4
just put the link text the normal <a href ='address'>e.da y.daynumber</a> in
the text property of the e.cell

(i dont remember the name for the day number i just pulled that off the top
of my head, you will have to look at the member list for it to find it)
"Bruce W..1" <br***@noDirect Email.com> wrote in message
news:3F******** *******@noDirec tEmail.com...
Brian Henry wrote:

do you want just the day text to be a link or the entire cell to be a link?

=============== =============== =============== ============

Either would be fine.

Nov 18 '05 #5

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

Similar topics

1
1327
by: Greg | last post by:
How do you get rid of the days of the month that are not in the month selected in a calendar control? For example, I have a calendar control that shows November, at the beginning and end of the calendar you can see the end of October and the first few days of December. All I want is November. Any ideas? Greg
8
2462
by: Shyguy | last post by:
Is it possible to create a calendar that shows previous input data and also allows for input of new data?
2
6752
by: patrick delifer | last post by:
I am binding some data to a calendar control. Since I don't want to return all the Data from the DB, I would like to return only the data for the current view of the calendar. The calendar has always 42 cells. I would like to know if there is a way to know which date is displayed in the first cell of the calendar. Unfortuantely, there is no index in the calendar. ( I could go with the SelectedDate.Today as a reference and then subtract and...
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...
4
3751
by: Nad | last post by:
Hello, I have a user control that has a button and a Calendar. Once you click on the button I display the calendar. Now when I move this user control to a web form, once I click on this button the Calendar displays but it's transparent so other controls like labels on the web form which are supposed to be behind the Calendar can be seen. How do I make sure the Calendar is not transparent?
3
2802
by: Peter | last post by:
Does anyone have an example of how you would do a popup window when a user clicks on a day number link in the ASP.NET Web Calendar control? I am trying to create an event calendar similar to how Outlook works. When user clicks on the day number in the calendar control I want to display a popup window and let user add data and click on the Save button. The code under the save button will save the data to the database and close the popup...
5
2306
by: Peter | last post by:
Is it possible to span / display a graphic in the web calendar control that spans more than one cell / day? Does anyone have an example of this? Thanks Peter
4
4088
by: mimo | last post by:
Hi, I trying to develop an application that will have a calendar control that will allow me to put hyperlinks in the days of the calendar. And I need to be able to do this in a day, week, and month view. Is there a 3rd Party control that will allow me to have access to certain dates to pass in hyperlinks to put in? I am developing in ASP.NET 2.0. Or is it better to develop this? If so how do I go about it do I query and
4
3013
by: Simon | last post by:
By default, days in the calendar control are simply displayed as numbers, I want to show some days in a different color in this control. What is the best way to do that? Thanks very much.
0
9855
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9697
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
10907
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
10586
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
10647
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
10293
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
7017
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();...
2
4064
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3133
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.