0

在页面上,我通过将 PostBackUrl 设置为单击打开链接按钮上的附件

lnkCalendar.PostBackUrl = "AddScheduleToCalendar.aspx?scheduleGuid=" + scheduleGuid;

保存或关闭附件后,当前打开的网页按钮单击仍会再次打开相同的附件,但它们自己的单击事件不起作用。如果直到不单击附件链接按钮事件有效。AddScheduleToCalendar.aspx 页面加载方法的attachmnet 代码为

string calendarFormat = GetScheduleInfo();
            Response.ContentType = "text/calendar";
            Response.AppendHeader("content-disposition", "attachment; filename=MyCalendar.ics");
            Response.Write(calendarFormat);
            Response.End();
4

1 回答 1

0

当您回发打开附件时,您的页面生命周期将再次执行。

我最好的猜测是您在加载附件时没有分配 PostBackUrls。

提供有关如何加载这些附件的更多信息。

于 2009-05-15T06:12:19.247 回答