I have a page that uses an ASP.NET reorder list to organize the priority of projects. The page allows a user to move the projects around, and then click submit after all moves have been made (request from the end user). So, when each item is moved, it writes its current location and new location into a temporary table, then after submit is click, all the corresponding changes are made through stored procedures in SQL. The problem that I am having is that I am wanting to unload all the changes in the temporary table on the Page Unload event. For some reason in this control, the Page Unload event is fired when an item is moved in the reorder list. I have tried adding IsPostBack = False or IsCallBack = False then truncate the records in the page unload event, but that doesn't appear to work either. See Snippet.
Thanks in advance for the help!
Protected Sub Page_Unload(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Unload
If IsCallback = False Then