在一个页面上,我在链接按钮上打开一个附件单击设置PostBackUrl为
lnkCalendar.PostBackUrl = "AddScheduleToCalendar.aspx?scheduleGuid=" + scheduleGuid;
保存或关闭附件后,当前打开网页按钮单击仍然打开相同的附件再次单击自己的单击事件不起作用。如果不点击附件链接按钮,事件工作。
string calendarFormat = GetScheduleInfo(); Response.ContentType = "text/calendar"; Response.AppendHeader("content-disposition", "attachment; filename=MyCalendar.ics"); Response.Write(calendarFormat); Response.End();
回发以打开附件时,将再次执行页面生命周期。
我最好的猜测是,您在加载附件时没有分配postbackurl。