Archive for the ‘ASP.NET’ Category

A generic error occurred in GDI+

ASP.NET 19.6.2010 No Comments

While working on a project recently, I was playing around with image resizing and cropping. While I’ve worked with this before, this was the first time I got into it more indepth. I suddenly encountered this error which I found to be horribly bad description for an error. After researching and testing my application, I…

Read More

Adding a check all box to check checkboxes within a row in a Gridview

When developing a gridview recently, the need to be able to have a check all button within a row on the gridview came up. At first I thought this would be an easy task, but it turned out that my first few ideas/attempts didn’t really work out. The key for this ability is that I…

Read More

Create Dynamic XML Files with ASP.NET HTTP Handlers

ASP.NET, C# 1.6.2009 3 Comments

The internet in it’s current state sees XML as a very mature technology to allow data to be transferred between sites. There may be many times when you will want to generate XML files in your web solutions and ASP.NET provides HTTP Handlers to assist in this task. The ASHX files that you create in…

Read More

Using SCOPE_IDENTITY() with ObjectDataSource

ASP.NET, SQL 25.4.2009 No Comments

Microsoft’s introduction of the ObjectDatasource in ASP.NET 2.0 was a great addition. It saves developers alot of time once they are familar with the controls. The problem is that what seemed like simple tasks when coding everything by hand sometimes became more difficult to figure out. For example, how do I return the identity seed…

Read More

Create popup date picker in seperate window using ASP.NET calendar control

ASP.NET, C#, VB.NET 13.4.2009 3 Comments

I’ve gotten alot of feedback on our popup ASP.NET calendar control I posted awhile back. In that post I did it with a “fake” popup using DIV’s. In this post, I will do it with a traditional popup window.

Read More

Using Parameters/Parameterized Queries in database interactions with C# and VB.NET

When writing ASP.NET applications, you need to be careful with your code to protect from misuse by would be hackers. One of the best ways to do this is to parametrize your queries. Not only will using parameters help against SQL injection attacks, but it’s best practice to do so and avoid large string concatenation….

Read More

Return a line break or carriage return in ASP.NET page

ASP.NET, C#, VB.NET 3.4.2009 1 Comment

I came across the issue today of needing to output some text from a multiline textbox and having a few issues on preserving the line breaks/carriage returns from the textbox. If you view the source on the page, it would look correct, but yet the display on the HTML page would show no line breaks.

Read More
12»