I expected to type \n into the ConfirmText property of the AJAX Control Toolkit’s ConfirmButtonExtender and get a new line. This doesn’t work, but you can use this character code: Specifically, ampersand pound ten semicolon.
When I upgraded to ASP.NET 4.0, runtime errors suddenly became very slow. There was a consistent two-minute delay before my custom error page would appear. The rest of the website was lightning fast, so it was not related to compilation. I finally decided to tackle this problem, so I started copying blocks of code into a new, blank custom error page. The delay was not present until I […]
Controls inside an ASP.NET UpdatePanel cannot be bound to jQuery events after a partial postback. Here are some tips using pageLoad(): http://forums.asp.net/p/1189519/2039138.aspx http://encosia.com/simplify-aspnet-ajax-client-side-page-initialization/
Sometimes I require unique values in a column that allows nulls. CREATE UNIQUE NONCLUSTERED INDEX IndexName ON dbo.TableName(ColumnName) WHERE ColumnName IS NOT NULL http://connect.microsoft.com Update: SQL Server Management Studio has this functionality built into the Index Properties dialog. ([ColumnName] IS NOT NULL) http://stackoverflow.com
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 […]
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 = […]
SQL Server Profiler requires you to have ALTER TRACE permission. There are two ways to grant that permission. Properties: Object Explorer -> Security -> Logins -> your_login -> Securables -> Search button -> “The server” radio button -> “Grant” checkbox on “Alter Trace” SQL: GRANT ALTER TRACE TO myuser
To save a password hash to an XML file, you can call this function: FormsAuthentication.HashPasswordForStoringInConfigFile(txtPassword.Text & "|" & txtUsername.Text, "SHA1") You can see my attempt at a password salt by simply apppending the Username.