After attachment page open events don't work in asp.net

On the page, I open the attachment when the link button is clicked, setting PostBackUrl as

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

      

After saving or closing the attachment, the currently open web page buttons reopen the same application and also perform their own click actions. If until the link is clicked, buttom event events will work. The attachmnet code in the AddScheduleToCalendar.aspx page load method is -

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

      

0


a source to share


1 answer


When you post back to open attachments, the page life cycle runs again.

My best guess is that you are not assigning PostBackUrls when uploading an attachment.



Please provide more information on how to download these attachments.

0


a source







All Articles