Archives
-
Ancestor and Descendant IDs/info list using Common Table Expressions
Needed some TSQL code again to retrieve descendant and ancestor entries in a self-referencing table. I've done this a couple of times already and although I can write it from the top of my head, sometimes you just want to make life easier and have a script you can just modify a bit to fit the new requirement.
-
Sys.ArgumentException: Value must not be null for Controls and Behaviors
I was going thru some pages for my current project today when I ran into the said error "Sys.ArgumentException: Value must not be null for Controls and Behaviors". It was the first time I've encountered it and since it was working the last time I browsed it I didn't have a clue what was causing it so had to dig around. [more]
-
Recent SQL Injection Attacks on ASP sites
There seems to be a number of SQL injection attacks happening lately involving adding of <script src=http://www.banner82.org/b.js></script>, adword71.com/b.js (and the likes ) to entries under string/text/varchar columns in the database targetting ASP (classic/3.0) sites and SQL Server. Note, they need not know your table or column names to mess up with you.
-
Updating ASP cookie from ASP.NET (vice versa)
You might encounter a case where updating an ASP (classic/3.0) cookie from ASP.NET code (or vice versa) doesn't work. That is despite updating the cookie value, the old value still remains.
-
Button doesn't postback after clicking Back Button in Firefox
I ran into this behavior (which I think is weird) where a button no longer posts back to ther server after I click on a the Firefox's back button.
-
Page ViewState, Control ViewState and ControlState
Just a quick note. I was working on some Web User Control and needed to persist information across postbacks and thought of using ViewState. But while I was working on it, I realized that I was using the same key for saving another information in the parent Page's (the Page containing the user control) ViewState.
-
Control Visibility, ViewState and Security and Performance
It is not unheard of to come across a solution where use of asp:Placeholder and asp:Panel (or some other container) Visibility is employed to show/hide certain details from the user especially when when implementing "simple" Authorization/Permission features ("simple" since there are likely more complicated and/or better ways to handle it) Of course you could always implement declarative authorization features in ASP.NET but I believe it would cause the user to be redirected to the page identified as the login url and might not be applicable if you want to stay on the same page.
-
Hand Editing Web.Config or not
I've come across a number of issues in the past where the cause of the issue is that someone hand edited the web.config and resulted to a not well formed XML (missing tags, unclosed quotes et al).
-
ASP.NET Development Server cannot be accessed using non-localhost URL
An interesting point about the ASP.NET Development Server (previously named "Cassini") was raised hours ago by Alvin, a coworker of mine.
-
Issue with System.Transactions, SqlConnection and Timeout
Just recently, a post was made in Microsoft Forums regarding a bug/behavior of Committable Transactions and SqlConnection timeout. The same issue is evident for TransactionScope which was posted in 2006. Good thing there is a fix.