Tuesday, November 8, 2011

Public properties in ASP.NET custom web controls ...

Came across a problem at work today ... it's related to public properties in ASP.NET custom web controls.
How and where does ASP.NET stores custom public properties in Web Forms? and how should we handle it?
The short answer is memory, thus if a post-back is done, the information will be gone.

There's 3 ways to mitigate this issue:
1) Session variable - stores the property in session ... if you need to access the property somewhere else in the session (like another page)
2) View state - stores the property in view state ... this should work if you would like to preserve the state of the page (and that you're not navigating away from the page)
3) Control state - saves the information in Control state (i think this is page of viewstate), but will still works even if viewstate is turned off. This also might be a better idea if you don't want to manually manage the view state of the variables. However, this will require more work because you will have to write your own custom ControlState methods to load/store the control state. I guess they all have its trade offs.
Here's a couple of example on how to do this:
http://aspnetresources.com/blog/how_to_preserve_control_state - great example
http://msdn.microsoft.com/en-us/library/1whwt1k7.aspx - comparison of view state v. control state

see Q&A on StackOverflow ... great answers by many by the way.

Here's a quick update on this topic:
Phil did a great great job explaining the control state and how to implement it and it works great !
The store multiple values in the control state please take a look at the comments, one of the commentator
gave a tip on how to do that.

Happy Coding!

Wednesday, October 5, 2011

Release notes?

I've been looking for resources on how to write good release notes and I came across this article that proof to be helpful:


also, i found the release notes from TextPad very helpful as well because it's concise, to the point and suitable for a project that has multiple releases that has somewhat of a rapid cycle ... and it does follow the principal laid out in the blog post mentioned above.


Happy coding and writing awesome release notes !


Monday, June 20, 2011

Update .... From operations in Oracle

Who knew that an update statement (with inner joins) in Oracle could be complicated?
Here's a good primer if you're looking for an "Update ... from" alternative in Oracle.


Thursday, March 31, 2011

More on LINQ

in case you're wondering if you could ever get more about LINQ ... the .NET Guru Jon Skeet had decided to give it another look and some more explanation, he has a new ebook out about LINQ (or best yet, reimplementing them)

read the explanations here -> http://msmvps.com/blogs/jon_skeet/archive/2011/03/18/edulinq-the-e-book.aspx
read the e-book here -> http://code.google.com/p/edulinq/downloads/list

Tuesday, March 22, 2011

I'm back

With my last post, I guess this blog is officially back!
I'm currently working as a software developer and I mostly work with ASP.NET/C# and occasionally some VB.NET. I'm learning ASP.NET MVC and it definitely looks like a pretty awesome framework.

More binary thoughts to come...


Linq bridge, LINQ for .NET 2.0

I was pretty excited when I saw this .... if you've been using LINQ and love the ease of it and wished it existed for .NET 2.0 (for older projects), you're not out of luck.

This website -->  http://www.albahari.com/nutshell/linqbridge.aspx explained why it is possible to use LINQ on top of .NET 2.0 and provided a DLL for it.
Also see their Google Code page --> http://code.google.com/p/linqbridge/ it has some good examples on their WIKI site as far as how to use LINQ Bridge ...

whooop! (a  Texas Aggie jargon for excitement.)

until next time.

Tuesday, June 17, 2008

FF 3.0 British Version .....

if .... you can't wait .... (i know the servers is US is really really overloaded ... )
try the British version ...