代码之家  ›  专栏  ›  技术社区  ›  Nakul Chaudhary

打开附件页后,asp.net中的事件不起作用

  •  0
  • Nakul Chaudhary  · 技术社区  · 17 年前

    在一个页面上,我在链接按钮上打开一个附件单击设置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();
    
    1 回复  |  直到 17 年前
        1
  •  0
  •   nunespascal    17 年前

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

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

    推荐文章