Category: C#

Dynamically populate dropdownlist in ASP.NET MVC

There are a few different ways to dynamically populate a dropdownlist in MVC: you could use a classic ASP old school loop with a bunch of response.writes, you can store the list’s collection into ViewData and use an html helper, or you can use jquery. We’ll look at samples for each way. Populate dropdownlist with [...]

February 09 / 2010

TinyMCE samples with ASP.NET MVC

After using Telerik’s RadEditor control for years with all my asp.net web form applications, I found myself looking for a javascript alternative when I moved up to MVC. Having paid top dollar for RadEditor (which is a fine product!) and never used TinyMCE, I couldn’t imagine something free could be that good. Well it is! [...]

February 08 / 2010
Author bill sternberger
Category ASP.NET MVC, C#, Html, jquery
Comments 3 Comments

Export to Excel or CSV from ASP.NET MVC with C#

Since programming way back in the Classic ASP days, at some point a client always wants to export an html grid into an Excel grid. In c#, that need didn’t disappear, but got a lot easier with GridView and the HtmlTextWriter. Finally reached that point in my ASP.NET MVC programming world, and quite frankly, am [...]

January 27 / 2010
Author bill sternberger
Category ASP.NET MVC, C#
Comments 3 Comments

ActiveRecord ICriterion Search Example (c#)

In this post we are going to search using ICriterion to filter and sort the results. The only pre-requisite is that you properly configure your nHibernate environment, and like all my other code samples, know c#. This one is pretty easy, first we are going to set the required references: Then we are going to [...]

January 14 / 2010
Author bill sternberger
Comments No Comments

Javascript, jQuery Rich text editor

I did a post earlier today (yes, I’m on a roll while jr. is sleeping!) on my Top 10 favorite jQuery functions and plugins. This post is dedicated to one of them: TinyMCE. In the past I’ve used editors like Telerik’s RAD Editor and obout’s Html Editor, both very powerful editors. I was turned on [...]

January 09 / 2010
Author bill sternberger
Category C#, Html, jquery
Comments No Comments