by ira
4. May 2009 19:13
In April of '08, I wrote a post about cleaning up the ASP.NET head tag using control adapters. I've got some great feedback from it, and I'm glad that I'm not the only one that is horrified when looking at the source of an ASP.NET rendered web page. From the comments of that article I was recently asked how to clean up JavaScript tags. With the code from the project download of the article as-is, when I just slap some script tags in the head tag I get something that looks like this rendered: However, so...
[More]
by Ira
26. November 2008 18:30
If you have read any of my previous posts on site wide user notification patterns and controls, then you may know where this is going. I have compiled a server control to bring this functionality to the fingertips of my fellow ASP.NET developers! Simply drag and drop the control onto your page or your master page and you are in business. I figured out how tired I was of trying to get notifications to users in a simple way and got tired of rewriting one on every project. Lets take a look at how it works. ...
[More]
by Ira
23. September 2008 18:36
A little while back I came across a great post on how to use JQuery to do more efficient client side paging by Dave Ward. The sample shows you how to use JQuery to do Ajax callbacks for client side paging using a grid template. After downloading the demo and parsing through it all, I found a lot of things I really liked and even came across a little gotchya with the way ASP.NET serializes dates in JSON.
One part I really enjoyed about this sample is that your objects on the server are tra...
[More]
by Ira
3. June 2008 17:53
A short time ago I was confronted with a serious problem. What I needed to do was dynamically choose a UserControl as well as fire methods from that UserControl. The problem lies in the fact that a UserControl does not implement my custom methods that I needed for my controls. Each control was similar and would have the same methods but it would have different display characteristics. That was when I had a small epiphany. Why can't I just make an abstract base class? Well the answer is you can! Som...
[More]
by Ira
21. April 2008 17:47
If you haven't tried using the event model in .NET you don't know what you're missing. If this is the case, then I'm glad you're here. Events are a very nice way to add flexibility to your projects. You can use them for a variety of things including validation and logging. You can think of an event as sort of an All Points Bulletin (APB) throughout your application. Once you declare and throw an event, every place in your code that has an event handler for that event wil...
[More]
by Ira
14. April 2008 18:39
Ok, if you're anything like me you absolutely gag when you see the rendered content of the ASP.NET head tag. It is all rendered out inline for some reason. I'm not 100% sure about the affects of it on web marketing, but I know one thing is for sure... It certainly doesn't help your rankings any. At the very least it looks gross and it can be easily fixed with some portable c# files that you can include in any project. I found a reference here about it, so I picked it up and ran with it.
...
[More]
by Ira
27. March 2008 20:26
So I was stuck in a scenario where I needed to have multiple DetailsViews run an update command at the same time. I thought through it in my head saying to myself, "How do I click two update buttons at once?". Wouldn't it be nice if I could have a single button click event and have both DetailsView controls update at the same time? I tried simply calling the .Update() method of the ObjectDataSouce controls they were bound to and it didn't work. So I had one last thought, wouldn't it ...
[More]
by Ira
23. March 2008 19:08
Ok, I ran into a major problem not so long ago. This problem stemmed from a DataObject that had a child object within it, here in referred to as a "complex object". When I put an ObjectDataSource on my page and bound to my business layer with my complex DataObject, for some reason only the simple properties would show up. Simple properties being those that are passed by value and of a .NET system type. My custom typed property never shows up in my data bound control. Hmmmmm...
...
[More]
by Ira
13. March 2008 18:37
Lately, I have been having to deal with finding ASP.NET Ajax when creating server controls. It is actually quite simple to do, and I think that if you are going to be coding server controls for ASP.NET you should definitely know how to do it. So in this post, we will go through embedding a javascript file into your assembly and then registering it to the page. Then I will show you how to find out if ASP.NET Ajax is loaded during the script registration and also how to find out if ASP.NET Ajax is loaded in...
[More]
by Ira
9. March 2008 17:09
Some of you may have read my previous post Creating a Simple Site Wide User Notification Pattern. Upon a revision round of thinking, I thought it may be better to actually have a server control. This would offer some significant advantages, the biggest one being that we could drop the BaseMasterPage. Having the control be a strongly typed server control, we could find it on the page by it's type. We would also only have one place to go to maintain the code, rather than digging through a user controls ...
[More]