GridView sorting & paging

I would like to display simple gridview on my page and provide sorting and paging functionality to it. Sorting and paging individually is working ok, but the combination of both does not. For example if I sort the first column descending and then go to page number two, then I see the second page of data with default sorting (ascending).

Difference between AsyncPostBackTrigger and PostBackTrigger on UpdatePanel?

I have a GridView(ucLAD) in my UpdatePanel(upnlListing). Inside my ucLAD I have a checkbox and an action for rowClicked: <asp:UpdatePanel ID="upnlListing" runat="server" > <Triggers> <asp:AsyncPostBackTrigger ControlID="ucLAD"/> <%– <asp:PostBackTrigger ControlID="ucLAD"/> –%> </Triggers> <ContentTemplate> <asp:Panel ID="pnlRequest" runat="server" style="margin-top:15px; height: auto;"> <ucgv:BaseGrid runat="server" ID="ucLAD"/> </asp:Panel> </ContentTemplate> </asp:UpdatePanel> When I use the PostBackTrigger the action performed would be the … Read more

Should I use OwinContext’s Environment to hold application specific data per request

I need a way to store a logging object per request. With HttpContext I would add this to the items Dictionary. I don’t want to bring HttpContext into this if I can help it.
The below code is what I propose for a Unity LifeTimeManager that will store objects in OwinContext’s Environment property, which I have access to with my Owin middleware.