jQuery: How to style Selects and <asp:dropdowns

There is a strange thing about select tags. Browsers do the styling and you have almost no power over it! You can change some colors and fonts but you can never make them beautiful (or in my case I can’t give the designer a chance to make them beautiful).
I searched for a while and found some approaches with pointer-events and divs but they aren’t a complete solution because they either aren’t cross-browser or you can’t style the options of the select.
Continue reading


jQuery: Making AJAX Applications Crawlable

If you want a fast and responsive web app, then you are definitely using jQuery (or any other javascript libray) and ajax calls to keep the size of the page small and transfer only the data the user requested.

The problem that came along with this approach is that search engines can’t interact with your page the way a user does, and so, there is no way for a search engine to make the ajax call and get the content back from the server. Spiders just aren’t browsers and users! (Learn more about it here)

Continue reading

Visual Studio 2012.4, “Run As Administrator” -> “The application cannot start” error

After a good 2 hours of searching what the **** happened and Visual Studio stopped working, I finally found a working solution…

Just copy all dte*.olb files, from C:\Program Files (X86)\Common Files\Microsoft Shared\MSEnv to C:\Program Files X86\Microsoft Visual Studio 9.0\Common7\IDE.

Just for the record, I tried “devenv /resetuserdata” and deleting the involved registry keys with no luck at all. I end up using Process Monitor after reading this post: http://blogs.msdn.com/b/visualstudio/archive/2009/10/29/how-to-fix-the-application-cannot-start-error.aspx?PageIndex=4.

With a little luck and a lot of tries,  I got a headache and a working studio.

How to Minify JavaScript with C#, a Google PageSpeed suggestion

Google sais “compacting JavaScript code can save many bytes of data and speed up downloading, parsing, and execution time” and that is obviously true (you can read about it here. And although there are many tools to minify javascript, like JSMin and YUI Compressor, it’s quite time consuming (and boring) to have to run these tools for each change your Web Designer decides to do for every JS file in your project. Except that, non of these tools compacts JS in one file to minimize browser requests.

The solution I came up goes like this (in my project this code runs only once in every application boot by using HttpContext.Current.Cache)

Step 1
Add a new Web Form to your project and name it js.aspx

Continue reading

Client-Side filtering of a RadListBox for ASP.NET AJAX with jQuery

The well known “Write Less, Do More, JavaScript Library” can easily help you filter options of select tag. Problem is, that Telerik’s control produces a different set of tags as your drop down list:

<div id="rdSchem" class="RadListBox RadListBox_Default RadListBoxScrollable">
	<div class="rlbGroup rlbGroupRight">
		<ul class="rlbList">
			<li id="rdSchem_i0" class="rlbItem">
				<input type="checkbox" class="rlbCheck">
				<span class="rlbText">Option 1</span>
			<li id="rdSchem_i1" class="rlbItem">
				<input type="checkbox" class="rlbCheck">
				<span class="rlbText">Option 2</span>
	<input id="rdSchem_ClientState" name="rdSchem_ClientState" type="hidden" autocomplete="off" value="{&quot;isEnabled&quot;:true,&quot;logEntries&quot;:[],&quot;selectedIndices&quot;:[],&quot;checkedIndices&quot;:[],&quot;scrollPosition&quot;:0}">

Continue reading

Export MS SQL Database schema with C#

A few days ago, I was searching for a way to export MS SQL schema of all databases of a server for backup and migration purposes. Although I found some tools, what I needed was a way to get stored procedures, functions, views, triggers and everything even if it was encrypted.

Since I couldn’t find a way to automate this (e.g. run it every night to backup schema of my server), I thought it would be a nice weekend project.

You can read more about it, or download project from https://github.com/georgekosmidis/mssql-schema-dump!

Continue reading