Tuesday, November 25, 2008

Error in Calendar Extender because the master page has asp tag <%%>

Today, I just annoyed with this error.
Every form which using Calendar extension works fine before.
and somehow after I change the master page, it start to show an error said :

=================
System.Web.HttpException: The Controls collection cannot be modified because the control contains code blocks (i.e. ).
=================

Luckily, with Tom's Help, I found the problem.
It was on the master page on the header java script which use <%= ... %> to get the content from server....

Thursday, November 20, 2008

Pomegranate Phone

http://www.pomegranatephone.com/default.html

Wednesday, November 19, 2008

Url Rewriting VS Postback

To Resolve a problem in postback for url rewriting,
you can use control adaptor and rewrite the form.

public class FormRewriter : System.Web.UI.Adapters.ControlAdapter

more information : visit : http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx

Thursday, October 23, 2008

EnableSortingAndPagingCallback Issue With LinqDataSource

Today, I found an issue with EnableSortingAndPagingCallback and LinqDataSource

I enable the EnableSortingAndPagingCallback on my GridView and using LinqDataSource.
Somehow after I tested, I always get error on deleting the row after move to the next page.

====
The solutions which work well is Use Update panel instead of EnableSortingAndPagingCallback.

I think it's better to use Update Panel rather then enableSortingAndPagingCallback, it some reason, it's faster and also include editing and deleting as well.

Monday, October 13, 2008

SWF Library to convert image

I just find library to convert SWF to image. it's called SWFToImage.dll from bytescout.
but it is activeX. which we don't want to use.

and I find others called swfdotnet-1.0 but unfortunately, it only support swf version 7.

Any other library for this ?

Thanks.

LINQ will arround the DateTime.MaxValue

Today, I just fixed the bugs which is interesting.

if we use linq to filter data with this DateTime.MaxValue.TimeOfDay.ToString();-
which will be appear show the time 23:59:59.9999999

Linq will add up to the next day.

so the solution never use the MaxValue.TimeOfDay.. just use simple string 23:59:59 and it's enough.

(o,o)

Thursday, August 14, 2008

Firefox 3 - Caching ISSUE

in Firefox 3 there is a weird bug which it somehow cache the page for no reason.
It just does not request to the server anymore... -(only if you update your updatepanel.


I have try many thing to avoid this.
1. Put meta tag which FF3 will ignore this -(
meta equiv="expires" content="Mon, 01 Jan 1990 00:00:00 GMT"
meta equiv="Cache-control" content="no-cache"
meta equiv="Cache-control" content="no-store"
meta equiv="Cache-control" content="must-revalidate"
meta equiv="pragma" content="no-cache"

2.Add Response Header - FF3 read this and by using Firebug, I notice that this info has been added to header
but it only worked in the first time, but after a while, it starts caching again.


Response.Cache.SetAllowResponseInBrowserHistory(false);
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetNoStore();
Response.Cache.SetRevalidation(HttpCacheRevalidation.AllCaches) ;
Response.Expires = 0;

=======
Desperately I find doggy solution to handle this.
1. I notice that if the query string is change, FF3 will not cache. so it still go back to the server.
just add ur querystring with DateTime.Now.TimeSpan.Tick at the back, and FF3 will not cache anymore.

2. go to about:config and disable browser.cache.disk.enable and browser.cache.memory.enable. But this is very doggy solution, you can't force all of user to disable there settings which is not default from FF3. - (So just ignore this solution)

======
More reference about this bug.
https://bugzilla.mozilla.org/show_bug.cgi?id=441751

https://bugzilla.mozilla.org/show_bug.cgi?id=327790#c8

http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.dotnet.framework.aspnet.caching&tid=6d5121f2-d78c-4e26-9d58-bbce507842b6&cat=en_US_f2b00e34-9211-4139-87be-4b28e2f0ef79&lang=en&cr=US&sloc=&p=1

http://www.alittlemadness.com/2008/07/30/ajax-vs-caching-vs-firefox-3/

http://www.killersites.com/mvnforum/mvnforum/viewthread?thread=11626

=====
Any other suggestion are welcome.