打开附件页后事件在asp.net中不起作用
在一个页面上,我打开一个链接上的附件按钮,点击设置PostBackUrl为打开附件页后事件在asp.net中不起作用,asp.net,attachment,Asp.net,Attachment,在一个页面上,我打开一个链接上的附件按钮,点击设置PostBackUrl为 lnkCalendar.PostBackUrl = "AddScheduleToCalendar.aspx?scheduleGuid=" + scheduleGuid; 保存或关闭附件后,当前打开的网页按钮单击仍会再次打开相同的附件,但其自己的单击事件不起作用。如果不单击“附件链接”按钮,则事件将起作用。 AddScheduleToCalendar.aspx页面的加载方法上的attachmnet代码为 string c
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();
当您回发打开附件时,页面生命周期将再次执行 我最好的猜测是,您在加载附件时没有分配PostBackURL 提供有关如何加载这些附件的详细信息