Posts tagged

ASP.Net DropDownList annoyance


I recently ran into a problem with using the ASP.Net DropDownList for toggling the status of an element. The problem stems from how the ASP.Net page object works. In this article I present the problem and then show a solution that seems to work with some caveats. (more…)

ASP.Net has 9 to 5 appeal


9 to 5 Appeal

ASP.Net CheckBoxes should be able to have values


The ASP.Net CheckBox and CheckBoxList control don’t allow for the use of the full W3C HTML standard. For some reason Microsoft decided to implement a reduced functionality version that creates more work for the programmer. Come on Microsoft why can’t you follow even the simplest of standards? In this case it would make coding the .Net framework easier for you not to mention us! (more…)

ASP.Net file download protection through authentication


Recently at work I needed to allow for the download of sensitive files over the web. Right away your mind should jump to the security issues involved with such an undertaking. How do you allow for download without compromising the sensitive data? There is a simple but flexible method that will work perfectly. (more…)

ASP.Net Dynamic Controls (Part 4)


I’ve had several people ask about redrawing a page that contains Dynamic Controls. The idea is that you have a page with a “Save” button that posts back but the page reloads exactly as it was. You can think of it like the “Apply” button in Windows but on a web page. The heart of the issue is what is the proper way to redisplay the data in the dynamic controls since they don’t have a viewstate. (more…)

ASP.Net Dynamic Controls (Part 3)


I have received a few requests via email and in comments for more detail on how to get your data back after postback with dynamic controls. This evening I started to put together some code examples and mulled over the details of the article in my head. The first step was to re-read my previous two articles so I could get my bearings on where to start. Part 1 of this series is an initial outline of how to create dynamic controls and use Request.Form to collect the data after postback. Part 2 went into detail on how to figure out which button was clicked to cause postback using a JavaScript technique. In the middle of re-reading the second article I had an epiphany. There is a better way to do that! The proper method is standards compliant, accessible and is outlined in the W3C HTML specifications. So I will put the original article on hold and explain this technique. (more…)

ASP.Net Regular Expressions


The RegularExpressionValidator control is an often overlooked tool for validation. A lot of people look at the validation expression and are puzzled at how to proceed. Most settle on the RequiredFieldValidator and hand coded filtering in the submit action. I hope to compile here a list of common expressions needed for web form validation so that your job is easier. (more…)

Error Handling Correction


Today I realized a huge problem with the global.asax error handling method that I provided in my last entry. The problem is that if you ever run into compilation errors you are left completely in the dark as to what page it came from. You just have the date, logged in user and ip address which isn’t very helpful. (more…)

ASP.Net Error Logging


Like any good ASP.Net developer I have Scott Guthrie’s blog bookmarked in my GReader. Recently I was browsing through the archives and came across an entry about not using Debug=”True” in production applications. I have to admit that I am VERY guilty of this since pretty much all of my applications are production and are using Debug=”True”. The reason for this is simple, I am just me and I have to monitor/update all of these applications. I do as much testing as I can before sending it off to production and moving on to the next project but often once the users start working with it something bad happens. The ability to have the errors logged including the line number in the source code is invaluable when going back to an application to fix a bug after a length of time. However, in light of Scott’s points it stops now. (more…)

Downlevel Forms Authentication


I ran into this issue a couple of weeks ago and have been itching to throw together an article about it. I initially suspected that it was a bug that was causing the problem but now I realize the truth. When you force a page into “Downlevel” mode using the ClientTarget property of the <%@ Page %> tag .Net doesn’t use cookies anymore. Out of the box forms authentication is done using session tracking via cookies and thus you are unable to log in. (more…)

Go to Top