Showing posts with label hint. Show all posts
Showing posts with label hint. Show all posts

Wednesday, January 14, 2009

Debugging Javascript

If you have Visual Studio 2008 you can debug javascript just like you debug C sharp cod.Just put a break point and run your project using the F5 key. But what if you don't have ??
All you have to do is add the debugger keyword on your javascript code where you want to debug.
When the code is executed IE will ask you if you want to debug and list the programs you have to debug the code. This technique also works with firefox+firebug.
To turn on javascript debuggin in IE you have to go in Tools->Internet Options and on the advanced tab uncheck the "Disable script debugging".
Be aware that this can cause the browser to show you errors in all sites ( and believe me there are a lot out there).

Wednesday, June 18, 2008

Linq for 2.0 framework

Want to use LINQ but you are still using the .net franework 2.0 ? Well you can use Linq to Objects thanks to this code.

Thursday, June 21, 2007

Unknown runtime error

This message is one of the worst error messages that a browser(IE) can give you.

There are a lot of theories to try to understand why this error happens.The truth is not even Microsoft knows why it happens (just look at the error message).

The only thing certain about this error is that it happens when you are manipulating the html of a div with javascript using the innerHTML method.

The workaround for this error is create another div, put the html inside it and append it to the original div.Here is some code:



originalDiv= document.getElementById('myDiv');

var t = document.createElement('div');

t.innerHTML =html;

originalDiv.appendChild(t);



I think the only message worse than this is "Catastrophic failure".. and you

what's the worst error message that you saw?





Powered by ScribeFire.

Wednesday, May 30, 2007

Hint ..improving permformance with asp.net ajax toolkit

 If you are using the asp.net ajax toolkit or anything like my codeplex project that depends on it you should look into your web.config for the configuration below and uncomment it

<scriptResourceHandler enableCompression="true" enableCaching="true" />

Believe in me..it makes a huge difference.





Powered by ScribeFire.