Add LinkButtons during OnDayRender event of ASP.NET Calendar Control

So I need to add some link buttons to each cell of a asp:calendar control dynamically based on data in the database. I wondering what the best way to do this is so that the the link buttons will be wired up to their events on postbacks (as to my knowledge creating the link buttons on the Day Render event and adding them there will occur after the LinkButton events would have fired).

How to bind a List to a gridview?

This might be quite a strange question since usually people bind only complex types to a gridview. But I need to bind a List of Int (the same is for strings).
Usually, as the property to bind one uses the name of the property of the object, but when using a Int or a String, the value is exactly the object itself, not a property.

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.