0 Replies - 1291 Views - Last Post: 25 June 2005 - 12:09 AM

#1 root_hacker  Icon User is offline

  • New D.I.C Head
  • member icon

Reputation: 0
  • View blog
  • Posts: 22
  • Joined: 15-February 05

Asp Calendar

Posted 25 June 2005 - 12:09 AM

Description: copy and paste and run with iisWeekly view free for learning
 ok guys i asked about calander in asp here is the one i write it by myslef

thank u thank u

u can sit down now

Following is the week view
=================

Copy whole code give below

<%
function tagdates
End function

function drawcalander
'===================== calculating values for drawing calander
if request.QueryString("date")="" then
current_date=date()
else
current_date=request.QueryString("date")
End if
current_month=month(current_date)
current_year=year(current_date)
current_day=day(current_date)
first_day_month=day(dateserial(current_year,current_month,01))
last_day_month=day(dateserial(current_year,current_month+1,1-1))
weekday_monthfirst=weekday(dateserial(current_year,current_month,01))
weekday_today=weekday(dateserial(current_year,current_month,current_day))
first_day_week=dateadd("d",-(weekday_today-1),current_date)
last_day_week=dateadd("d",first_day_week+6,current_date)
'======================================
'response.write "
current date ="¤t_date&"
"
'response.write "
current month ="¤t_month&"
"
'response.write "
year ="¤t_year&"
"
'response.write "
todays date ="¤t_day&"
"
'response.write "
first day of month ="&first_day_month&"
"
'response.write "
last day of month is ="&last_day_month&"
"
'response.write "
weekday position of first day="&weekday_monthfirst&"
"
'response.write "
weekday position of todayss day="&weekday_today&"
"
'response.write "
first day of fiven week is="&dateadd("d",-(weekday_today-1),current_date)&"
"
response.write ""
response.write ""
response.write ""
response.write ""
response.write ""
response.write ""
response.write ""
response.write ""
response.write ""
response.write ""
response.write ""
response.write ""
response.write ""
response.write ""
days=day(first_day_week)
tmpdays=first_day_week
for i=1 to 7
'if days>=first_day_month and days<=last_day_month then
response.write ""
tmpdays=dateadd("d",+1,tmpdays)
'else
'response.write ""
'End if
next

response.write ""
response.write "
" response.write "<< " response.write monthname(current_month)&", "¤t_year response.write " >>" response.write "
" response.write "S" response.write "" response.write "M" response.write "" response.write "T" response.write "" response.write "W" response.write "" response.write "Th" response.write "" response.write "F" response.write "" response.write "Sa" response.write "
" response.write day(tmpdays) response.write "" 'response.write " " 'response.write "
" End function function najam 'response.write "inside function" a="najam is great" najam=a end function %> <% a=najam drawcalander 'response.write " "&a %>


Is This A Good Question/Topic? 0
  • +

Page 1 of 1