Hi, i dunno how to use calendar control . i need to bring data to the calendar on the respective date , whether calendar control will work both server side and client side. coz if i disable the javascript in mozilla , i couldnt able to scroll through the month , why so . ?
Want to display , data's from the table on the respective date in that control.. . - CREATE TABLE [dbo].[table1](
-
[fid] [int] IDENTITY(1,1) NOT NULL,
-
[Shows] [varchar](100) NULL,
-
[frmdate] [datetime] NULL,
-
}
i need to display the shows on the calender , .
Plz suggest...how to use the calender....?
4 3217 Frinavale 9,735
Recognized Expert Moderator Expert
What kind of Calendar control are you using?
Are you using the pure ASP.NET Calendar control or are you using an Ajax calendar control?
pure asp.net calendar tool ..
my code behind is c#
I am trying to build a calendar that loads the fields from a SQL database. I have a asp:calendar control on my web form.
The database has one table :
I need to know how to load the items from db to appear on a calendar . I'm using Visual Studio 2005, code behind is in C#.
Frinavale 9,735
Recognized Expert Moderator Expert
Please check out the following articles for information on how to connect to and read information from a database:
Once you've retrieved the data from the database, set the calendar's date.
if you are having a table with the following fields
LID varchar(50)
date datetime
write stored procedure as following -
CREATE PROCEDURE DISPLAYSCHEDULE
-
@LID varchar(50)
-
-
AS
-
select date from PSSDocShed
-
where LID=@LID
-
here PSSDocShed is the table name and DISPLAYSCHEDULE is the stored procedure name
in Bussiness class you need to write the following -
public static DataTable displayschedule(string id)
-
{
-
-
DbCommand cmd = GenericData.CreateCommand();
-
cmd.CommandText = "DISPLAYSCHEDULE";
-
cmd.Parameters.Add(new SqlParameter("@LID", id));
-
return GenericData.ExecuteReader(cmd);
-
-
}
-
now come to our calender page click event DayRender
and type the following -
protected void Calendar1_DayRender(object sender, DayRenderEventArgs e)
-
{
-
string id = Request.Cookies["PSSuid"].Value;
-
DataTable tb = businessclass.displayschedule(id);
-
for (int i = 0; i < tb.Rows.Count; i++)
-
{
-
-
if (e.Day.Date == Convert.ToDateTime(tb.Rows[i][0]))
-
{
-
e.Cell.BackColor = System.Drawing.Color.Pink;
-
-
}
-
-
}
-
-
-
-
-
}
-
this will result in
change the background color of the selected dates from database
and other dates remains as such
Hope this will help you
if you are using stored procedures and Three -tier architecture
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: tom |
last post by:
Hi,
I want a listbox below a hidden calendar control. The
problem is that the listbox will shadow the calendar when
the calendar is visible. How can I bring the calendar from
back to front?
Thanks in advance.
|
by: Trint Smith |
last post by:
My calendar control erases my upload file control data...
The control that allows you to select a file for upload???,
well after I do that, I click on the calendar day and when the screen
recovers from that, the directory and file are gone!!
Any help is appreciated.
Thanks,
Trint
.Net programmer
trintsmith@hotmail.com
|
by: Miguel Dias Moura |
last post by:
Hello,
i am trying to create a .css file with several styles and apply them to the
calendar control so i can change the look of:
1. Text Type and Format (Bold, Underline, etc)
2. Background Color
3. Foreground Color
4. Border Tickness
5. Border Color
|
by: bill yeager |
last post by:
I would like to place the currently selected date
(retrieved from the database) on a calendar control which
is embedded inside a datagrid. However, I can't find the
ID of the control to do so. During the "Edit" command of
the grid, I have the following code:
<code>
If e.CommandName = "Edit" Then
Dim myDatagridItem As DataGridItem
Dim lblStartDate As Label
Dim lblEndDate As Label
|
by: Caesar Augustus |
last post by:
First, let me start by saying my asp.net experience is still in it's
infancy so please bare with me as I try to explain my situation.
I have created a single page that with the use of many controls (i.e.
roundedcorners component www.4guysfromrolla.com], buttons and
panels) functions like a tab control. The buttons are
programmatically designed to make the corresponding panel visible.
Sample aspx.vb code:
| |
by: Paolo Pignatelli |
last post by:
I have an aspx code behind page that goes something like this in the HTML
view:
<asp:HyperLink id=HyperLink1 runat="server"
NavigateUrl='<%#"mailto:" &
DataBinder.Eval(Container.DataItem,"StoreEmail") & "&Subject=" &
DataBinder.Eval(Container.DataItem,"ProductName")
....
|
by: SAL |
last post by:
I'm sorry if this has been answered before but I didn't see it in a quick
scan of the list.
The following code is causing an error when the field is null:
Error text:
Conversion from type 'DBNull' to type 'Date' is not valid.
<asp:Calendar ID="Calendar2" runat="server" SelectedDate='<%#
Bind("DateReceived") %>'
VisibleDate='<%# Eval("DateReceived") %>'></asp:Calendar>
|
by: thorpk |
last post by:
I posted this problem earlier in the month and some one decided it was
better to change the subject and ask a completely different question.
I am therefore reposting. I am hoping some one can assist with this.
Thanks in advance.
I have an access database that i have added a pop up calendar to, the
Table information for the Date Reported field is
Date/Time
format short date,
input mask is 00/00/0000.
|
by: gan |
last post by:
hi dear all
please help me
im using the calander control from a form
just i paste here the problem,
the problem is when i click the calander button the calander is opening at the same time backside form component also visible in front side how can i rectfiy this one? i changed the z-index also but no use?
<TABLE border="1" bordercolor="#DDDFE7" bgcolor="#565656"cellPadding=0 cellSpacing="1" id=calendar style="DISPLAY:none;...
|
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...
|
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,...
| |
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...
|
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,...
|
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...
|
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...
|
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...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |