.NET Discoveries
all about my Web Development with ASP.NET and any C# discovers at Work and Home
-
LINQ in VS 2008 Having Problems to update tables or stored procedures from Database
I decided to post this because I have tried to update my dbml file (LINQ2SQL) several times and I have forgotten the steps.
-
Zip a folder in a Pragmatic way
Since I have been reading the book "The Pragmatic Programmer", I see the importance of using the available tools that you can find online. I have a requirement to add to a installer a zipped folder of the GlassFish (Java App Server) and then unzip it to process some files there and have GF running as a server. My first approach was use the GZipStream class from System.IO in my merge module. So I decided to do a Unit before include that code in my installer Merge Module. I found that C# class has not functionality to zip a folder with nested folders and I was thinking on create a recursive method to that job for me to accomplish that but I got a better "Pragmatic" idea, I googled it then I found a wonderful tool to do that, that fortunately is free to use on any project. It is SharpZipLib from ICSharpCode you can find it on http://www.icsharpcode.net/OpenSource/SharpZipLib/Default.aspx.
-
Excel Format for Export in ASP.NET
Recently I found this solution hope can help to others. I have a report that is created with GridViews and the client ask for functionality to export it to Excel. In some cases the report was giving different sum results in Excel as in the page. That is because when you export to Excel from ASP.NET you don't have control of the format and some values were not recognized as numbers. I didn't know that you can specify that with CSS. This was the solution
-
Alternative to Editable GridView in UserControls
First of all this is my first blog post and I´m not sure if it can be interesting for some of you. I was trying for some days in differents ways to have a GridView with Textbox to edit information created dinamically. I googled and looked to blog like this for some that could help me and most people says that they were having problems with dynamic GridView in UserControls. The reason I had to use a UserControl is that my requirement was to show the same kind of information but depending on a value (lets say state or country) the gridview shows 1 to n rows in the gridview and also on each row should contain some textboxes to entry information and validate them according to different rules per entity (state or country). Also the info in the GridView should collapsed and expanded that was with JavaScript of course.