Recent
Articles |
Startups Aren't Thinking About ASP.Net Higher costs and fewer skilled .Net hackers may be limiting startups to going with the hordes of Linux and C/C++ or Java developers and tools available when setting up shop. Long ago I asked the ColdFusion...
Invalid Postback Or Callback Argument I've hooked a health provider up in my web.config to send me all unhandled exceptions by e-mail. See here how to do that - you just have to put some lines in the web.config. Well, I get all sorts of different exceptions but one I get more than 20 times a day. It's actually...
Making Your ASP.NET App Extendable People have asked me how we build the extension model into BlogEngine.NET. There's nothing to it - really, there isn't. You need one small class and 14 lines of code in the global.asax. That is all you need to make your ASP.NET application extendable. An extension...
Localizing ASP.NET (Which Is Best?) There are different approaches to localizing an ASP.NET application. You can use a global resource file or local ones. The local resource files only applies to a single page or user control, whereas the global can be used from anywhere. I've always used the global...
ASP.NET Security: Remove The X-AspNet-Version... I've always been a little annoyed by the fact that ASP.NET websites sends the version number as a HTTP header. For an ASP.NET 2.0 application this is added automatically to the headers and you cannot remove...
ASP.NET: Don't Use The ThreadPool I've always been a big fan of using the ThreadPool for asynchronous execution, but in ASP.NET it is not the best approach for multi-threading. I'm not writing about when threading is appropriate and the impact of multi-core or dual core machines when doing threading, but...
|
|
 |
Recent WebProNews Articles |
Yahoo Moving On Up The Stock Charts Can't see nothin' in front of me Can't see nothin' coming up behind I make my way through this darkness I can't feel nothing but this chain that binds me -- The Boss doing, what else, The Rising. It may be too soon...
Finking On Paid Linking? It's been a couple of weeks since it became apparent that Google was penalizing link directories – at least a few of them – knocking them out of the SERPs even for their own business names. There's still no official word from Google on this, but there is plenty...
Facebook: Microsoft Love, New York Hate Microsoft may be ready to exchange up to $500 million for a 5 percent stake in Facebook, while New York Attorney General Andrew Cuomo wants the site held accountable for the actions of sexual predators.
Google Earth Could Go After Second Life Google Earth is getting increasingly realistic, but it still lacks elements related to human movement and interaction. Google may soon address this issue, however, as there’s word that Google Earth could...
Microsoft Taps PR Firm To Thwart Google Google's proposed purchase of DoubleClick earned it an invitation to a Senate subcommittee hearing this week. Microsoft's work with PR firm Burson-Marsteller could have helped print that invite. Skullduggery in the form of a whispering campaign against Google, carried...
Your Email Campaign Needs Work A study of email campaigns presented at the Shop.org Summit contended that marketers aren't doing enough to maximize the return on their efforts. The '2007 Retail Email Marketing Study' by Silverpop noted how email customers spend more online than their...
|
|
|
09.26.07
URL Rewrites & The HtmlForm Action Attribute
By
Mads Kristensen
A known bug in ASP.NET 1.x and 2.0 is that the action attribute of a form doesn't respect URL rewrites. Everyone that uses URL rewrites uses one of several mechanisms to take care of the action attribute bug.
Recently it has been quite popular to use control adapters and
.browser files to change the rendering of a form and its attributes. I've never liked that approach because it treats the symptom instead of fixing the problem in a transparent and clean way.
strongOpinion
The use of control adapters and .browser files to alter the output for different clients is just as bad as having separate stylesheet files for IE and Firefox.
Instead of writing cross-browser mark-up and CSS you treat the browser differences as an illness and try to treat it.
The thing is that you don't cure it by using control adapters; you just treat the symptom of not being able to (or don't care to) write cross-browser code.
However, it still has its right when dealing with mobile devices, but not much longer.
The browser in the iPhone or Windows Mobile is becoming so good that it soon doesn't matter anymore.
/strongOpinion
In the past I've used a custom overridden HtmlForm but when I had to do it recently on my job, I thought it was about time to make it better and cleaner.
I very much like the use of a custom form control approach because it is very transparent in what it does and where it does it.
The code

Download
RewriteForm.zip (320 bytes)
Comments
About the Author: Mads Kristensen currently works as a Senior Developer at Traceworks located
in Copenhagen, Denmark. Mads graduated from Copenhagen Technical Academy with a multimedia degree in
2003, but has been a professional developer since 2000. His main focus is on ASP.NET but is responsible for Winforms, Windows- and
web services in his daily work as well. A true .NET developer with great passion for the simple solution.
http://www.madskristensen.dk/
|