Tag: C#

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

How to remove & nbsp; from string in c#

Here is a line of code to remove all occurrences of   – or any other string for that matter – in a single shot. Ready for this complex feat of engineering?? Ok, here it is: string theResult = someString.Replace(“ ”,””); That’s it!

January 06 / 2010
Author bill sternberger
Category C#
Comments 1 Comment
Tags