9. March 2012 14:43by JP Hellemons in
C#, WinForms
How to extract all images from a PDF with your own C# Asp.Net WinForms application with the iTextSharp library from NuGet.
[More]Share or Bookmark this post…
1. November 2011 04:49by JP Hellemons in
Tools
So we have all used FxCop before haven’t we? Well I found out, that my version was 9.x and it prompted with an available update! So Microsoft’s download page opened. http://www.microsoft.com/download/en/details.aspx?id=6544
It only displays a small 1 kb file! a “readme.txt” file. That’s strange. So I checked again for an available download link, but ended up with the same readme file.
This is the content of the text file:
FxCop Installation Instructions 1. Download the Microsoft Windows SDK for Windows 7 and .NET Framework 4 version 7.1. 2. Run %ProgramFiles%\Microsoft SDKs\Windows\v7.1\Bin\FXCop\FxCopSetup.exe to install FxCop.
More...3. October 2011 05:44by JP Hellemons in
C#
Today I had a DataTable object with the top x rows of a query. select top 23 * from products
So my Asp.Net C# code looked like this:
private void SampleMethod(int toShow)
{
string sql = "SELECT top " + toShow + " * from products";
SqlCommand com = new SqlCommand(sql);
DataTable dt = dal.GetDataTable(com);
if (dt.Rows.Count > 0)
{
var a = dt.AsEnumerable().Where(
p => p.Field<int>("stock") > p.Field<int>("ProductMinStock"))
DataList2.DataSource = a;
DataList2.DataBind();
}
}
This crashed as you might have noticed. The error was:
More...26. September 2011 05:39by JP Hellemons in
C#
This blog post is all about how to make a nice form and have client side validation with jQuery and the famous validation plugin. After validation the data, the form will be posted asynchronous to an Asp.Net C# Webservice/webmethod. While the post is being processed, a nice loading image will be displayed to notify the user of the progress.
More...10. June 2011 20:44by JP Hellemons in
C#
As you can read in the blogpost about access jpg’s through ftp with asp.net. I have explained there how I connected with FTP and retrieved images of the IP security camera. Now I have slightly modified the LINQ so that it downloads the latest 3 images and I would like to animate the transition between them. Now I know that I can use some fancy jQuery for image transitions, but I would like to merge the three images in a Gif. Here is how I have accomplished it with Asp.Net C#
More...8. August 2010 21:16by JP Hellemons in
C#, IIS
This blog post is about how I used URL rewriting for a better organic search ranking. Maybe it helps out some other people who struggle to rewrite URL’s without components like URL Rewriter. It’s open source but it uses regular expressions in a configuration file. That is a more common way to rewrite, but that would make me rewrite a lot of code, because of the URL’s I have at the moment. And since developers are lazy efficient, we tend to try an other approach first. My current URL’s are: www.mydomain.com/product_details.aspx?id=1 www.mydomain.com/product_details.aspx?id=2 Product id 1 can be a car like Audi R8 and ID 2 can be a book like Harry Potter. Other solutions are based on URL’s like: www.mydomain.com/product_details.aspx?name=harry%20potter Which can be rewritten easily with a regular expression and the open source rewriting mentioned before. Here is how I solved it for my situation:
More...