Calander控制日渲染事件的问题 [英] Problem with Calander Control Day Render Event

查看:76
本文介绍了Calander控制日渲染事件的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Day Render Event在每个至少有一个活动的每个
日放置一个红色*。这对我的本地机器

工作正常。但它不适用于

生产服务器。以下是我的代码:


我甚至尝试过删除if if。只需将文字控件写入每个单元格,无论如何,

也无法在生产服务器上运行。


请帮忙。附:我知道我已正确上传代码

因为我所做的其他更改正确显示




这是我的代码。


Private Sub cldActivityDate_DayRender(ByVal sender As

System.Object,ByVal e As

System.Web.UI.WebControls。 DayRenderEventArgs)手柄

cldActivityDate.DayRender

Dim dr()As DataRow

Dim r As DataRow

试试

dr = CType(会话(" dsLAStateData"),

dsLAStateData).Iteneraries.Select(" EmployeeID ="& CType

(会话(UserInfo),UserInfo).ID)

每个r in博士

如果r.Item(活动日期)= e。 Day.Date

然后


e.Cell.Controls.AddAt(1,New

LiteralControl("< font color = red> *< / font>"))

''e.Cell.Controls.AddAt

(e.Cell.Controls.Count - 1,新的LiteralControl(<< font

color = red> *&l t; / font>"))

退出Sub

结束如果

下一页

Catch ex As Exception

lblError.Text = ex.Message& "在

cldActivityDate_DayRender"

结束尝试

结束子

解决方案

< blockquote>嗨比利,


我构建了一个测试Web应用程序,它在我身边正常工作。我认为

在继续前进之前需要更多信息:


1.当它无法工作时,您是否收到任何错误消息或异常

生产服务器?


2.请比较本地和

生产机器上安装的.NET Framework版本。我建议你检查System.Web.dll的版本和

aspnet_isapi.dll。我想执行以下步骤来检查

aspnet_isapi.dll:


a。转到控制面板 - > 管理工具 - > 互联网服务

经理。

b。右键单击默认网站,选择属性。

c。选择主目录面板,单击配置。

d。双击.aspx按钮。扩展名,你可以看到

aspnet_isapi.dll所在的位置,例如:

C:\ WINNT \ Mesrosoft.NET \ Framework \v1.0.3705 \ aspnet_ isapi.dll


注意:v1.0.3705是.NET Framework的版本。


我期待着您的回复。


祝你有愉快的一天!


问候,


HuangTM

Microsoft在线合作伙伴支持

MCSE / MCSD


安全! - www.microsoft.com/security

提供发布?°原样?没有保证并且没有权利。


好吧,我自己在生产中安装了.net framework 1.1

服务器。我大约3周前从Microsoft下载中下载了它。

以前这个服务器没有安装.net框架。


另外,我确定我的代码如果

它没有安装框架1.1,它甚至不会在生产服务器上运行。如果安装了1.0,我会得到一个丢失的文件

错误。


代码在我的笔记本电脑上正常工作,但没有在

生产服务器上的日历。


在生产服务器上我没有错误,其他所有功能正确


< b $ b bb bb Jacob

软件工程师


***通过Developersdex发送 http://www.developersdex.com ***

不要只是参加USENET ......获得奖励为它!


I am using the Day Render Event to place a red * on each
day where there is at least one event. This works fine on
my local machine. It however does not work on the
production server. The following is my code:

I even tried it removing the if completely. Just writing
the literal control to every cell no matter what and that
did not work on the production server either.

Please help. P.S. I know I have uploaded the code
correctly because other changes I have made appear
correctly.

Here is my code.

Private Sub cldActivityDate_DayRender(ByVal sender As
System.Object, ByVal e As
System.Web.UI.WebControls.DayRenderEventArgs) Handles
cldActivityDate.DayRender
Dim dr() As DataRow
Dim r As DataRow
Try
dr = CType(Session("dsLAStateData"),
dsLAStateData).Iteneraries.Select("EmployeeID=" & CType
(Session("UserInfo"), UserInfo).ID)
For Each r In dr
If r.Item("Activity Date") = e.Day.Date
Then

e.Cell.Controls.AddAt(1, New
LiteralControl("<font color=red>*</font>"))
''e.Cell.Controls.AddAt
(e.Cell.Controls.Count - 1, New LiteralControl("<font
color=red>*</font>"))
Exit Sub
End If
Next
Catch ex As Exception
lblError.Text = ex.Message & " in
cldActivityDate_DayRender"
End Try
End Sub

解决方案

Hi Billy,

I built a test Web application, and it works properly on my side. I think
more information is needed before moving forward:

1. Do you receive any error message or exception when it fails to work on
the production server?

2. Please compare the version of .NET Framework installed on your local and
production machine. I recommend you check the version of System.Web.dll and
aspnet_isapi.dll. I''d like to perform the following steps to check
aspnet_isapi.dll:

a. Go to "Control Panel" -> "Administrative Tools" -> "Internet Services
Manager".
b. Right click "Default Web Site", select "Properties".
c. Select the "Home Directory" panel, click "Configuration".
d. Double-click the ".aspx" extension and you can see where
aspnet_isapi.dll locates, for example:
C:\WINNT\Microsoft.NET\Framework\v1.0.3705\aspnet_ isapi.dll

Note: v1.0.3705 is the version of .NET Framework.

I look forward to hearing from you.

Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! ¨C www.microsoft.com/security
This posting is provided ?°as is?± with no warranties and confers no rights.


Well, I installed the .net framework 1.1 myself on the production
server. I downloaded it from Microsoft Downloads about 3 weeks ago.
Previously this server did not have the .net framework installed.

Also, I am sure my code would not even run on the production server if
it did not have the framework 1.1 installed. I would get a missing file
error if 1.0 was installed.

The code works correctly on my laptop but does not draw the * on the
calendar on the production server.

On the production server I get no errors and everything else functions
correctly.

Billy Jacobs
Software Engineer

*** Sent via Developersdex http://www.developersdex.com ***
Don''t just participate in USENET...get rewarded for it!


这篇关于Calander控制日渲染事件的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆