Archive / January, 2011

Remote Desktop Services Multiple Sessions

As far as I can tell, it is trivial to enable multiple simultaneous remote desktop sessions for Windows Server 2008. Open gpedit.msc Navigate to Computer Configuration -> Administrative Templates -> Windows Components -> Remote Desktop Services -> Remote Desktop Session Host -> Connections Double-click “Restrict Remote Desktop Services users to a single Remote Desktop Services […]

Scripting.FileSystemObject Read Subfolders

Read subfolders with the Scripting.FileSystemObject: <% Dim fso Dim ObjFolder Dim ObjSubFolders Dim ObjSubFolder Set fso = CreateObject(“Scripting.FileSystemObject”) Set ObjFolder = fso.GetFolder([folder path]) Set ObjSubFolders = ObjFolder.SubFolders Response.Write(“<ul>”) For Each ObjSubFolder In ObjSubFolders Response.Write(“<li>” & ObjSubFolder.Name & ” – ” & ObjSubFolder.Path & “</li>”) Next Response.Write(“</ul>”) %>

Entity Framework Count Child Entities

Expanding on the post “Entity Framework Filter Child Entity“, I finally figured out how to get a GridView to show the count of child records. Unfortunately I am returning the whole set of entities and doing a Count on them. It’s not a problem in this case. I’m just happy it works. Dim query = […]

Entity Framework Filter Child Entity

I was looking for a way to filter child entities with eager loading. I ran into this useful blog post by Beth Massi on the subject. Here is the code I ended up using. It doesn’t work with server-side paging, but I didn’t need it in this case. Dim query = (From x In db.OrderChecklistItems […]

Entity Framework GridView RowDataBound

I found it tricky to get actual entities in the GridView RowDataBound event. Per Diego Vega’s post here, this may only happen because I am using the EntitySetName property of the EntityDataSource.     Protected Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridView1.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then             Dim descriptor As ComponentModel.ICustomTypeDescriptor […]

jQuery Get Next Textbox in a GridViewRow

In a GridView I have a column of checkboxes and a column of textboxes. I wanted to modify the value of the textbox when the checkbox is checked. jQuery is the perfect fit for this. Here is the code I used: $(function () {     var $inp = $('input:checkbox');     $inp.bind('click', function () {         […]