I have created a Powershell script that involves automatic assignment of page design to an item. Below are the portions of codes I am using:
Powershell code:
C-Sharp code
My problem is that whenever I am going to end the editing (whenever I hit the OnItemSaving event), I am not getting any value for the HttpContext.Current; hence, my request is being returned.
I do not want to remove the checks for HttpContext.Current as I still want to validate whenever it's empty or not.