I created an application which rendered a report in HTML. To improve it, I wanted it to open the rendered file in browser to simplify the viewing one. In the beginning I thought about using the CMD file, but I found a better solution.
(read more...)I created an application which rendered a report in HTML. To improve it, I wanted it to open the rendered file in browser to simplify the viewing one. In the beginning I thought about using the CMD file, but I found a better solution.
(read more...)In my application I had rendered JSON data with AngularJS and I had to send it to a controller in my MVC application to render PDF file and to allow a user to save it. So, the task was dynamically to submit the request, render a file and allow user to save it.
(read more...)StreamWriter has some options of usage. You can as add new text to an existing text in file, so and to clean existing text and add a new one.
C# snippet below helps to read SQL data to List<T> generic collection without any extensions or frameworks only with SQL and LINQ.
Junior developer created some tools which packed to zip-archive some rendered files. He used for this DotNetZip (Ionic.Zip) library. Everything worked fine until today. But today, when users users tried to open zip-file, they've got the error "CRC has failed, the file is corrupt".
(read more...)
You can get list of available NuGet packages for Visual Studio using Package Manager Console (in VS – Tools / NuGet Package Manager / Package Manager Console).
Here's a useful snippet in C#. This method gets all the images from variable type String. It can be HTML or XML text with tags <img src="path_to_image">
Reading and querying XML data is good with Link to XML in C#. LINQ to XML provides an in-memory XML programming interface that leverages the .NET Language-Integrated Query (LINQ) Framework.
CsvHelper is a very good library for reading and writing CSV files. It’s really easy for coding and fast for work. You can install it via Nuget in Visual studio or download from the project page in GitHub https://github.com/JoshClose/CsvHelper. (read more...)
When I was developing a web service for SharePoint 2010 I had to fill in "assembly strong name" in .asmx file. Below I repost a very nice method how to get an "assembly strong name" in Visual Studio.