Adnan’s Blog

The average programmer uses the general Debug mode by using the “Start Debugging” option from the Debug menu, or the F5 shortcut key. But what if you want to debug an application that is already running? If you faced this problem, then this tip should lighten up your day.

Choose Debug | Attach to Process….

Select the aspnet_wp.exe from the list of Available Processes and click on Attach

Attach To Process...

Attach To Process...

Alternatively you can also use ALT + D , P to select the option.

Advertisements

Although there are tons of charting / reporting plugins ranging from inline charts to flash charts, each one is unique in terms of technology, footprint or usage. I needed something compatible with jQuery and supported many as many chart types as possible. Here is the pick list:

1. jQuery Google Charting (http://www.keith-wood.name/gChart.html)

This plugin allows you to leverage the power and simplicity of Google Reporting. Easy to use with detailed examples, and wide support for chart types makes this an impressive must see.

2. Flot (http://code.google.com/p/flot/)

This plugin is very similar to its prototype counterpart Flotr. Again kudos for good examples and an excellent plugin.

3. Canvas Chart Plugin (http://www.filamentgroup.com/lab/creating_accessible_charts_using_canvas_and_jquery/)

Another great plugin, but does have a few rough edges on the cross-browser compatibility due to the issue of canvas tag support in some browsers like IE. Luckily there’s a good plugin to solve this problem, which they have also mentioned on their website.

I needed to integrate support for vCalendar in my current project. So i went through the vCalendar spec 1.0 at http://www.imc.org/pdi/vcal-10.txt and wrote this class. Although I have not implemented all the specification features, but this should prove sufficient for the usual requirements. If you have any comments / suggestions , let me know.

Read the rest of this entry »

Tags: ,

Heres a quick tip. If you need to include a request for read receipt like Microsoft Outlook while sending mails through Asp.net, just add the Disposition-Notification-To Header to the MailMessage.

The MailMessage class does not have a corresponding attribute and thus it has to be set through the Header.

MailMessage mm = new MailMessage(fromAddress, toAddress);
mm.Subject = subject;
mm.Headers.Add("Disposition-Notification-To", sendReadReceiptToAddress);

Please keep in mind that this is only a request, and can be rejected/ignored by the Mail Client/User configuration.

In my current project I needed to access the Session state in a Generic Handler. To my dismay, i realized that the Session StateBag was null. The StateBag class is sealed and manages the Viewstate of the Asp.net server controls and pages.

Upon discussion with my colleague, Mr. Hamed, we found the solution to my problem. Using the IRequiresSessionState interface in System.Web.SessionState, we got access to Session state.

According to Microsoft “Specifies that the target HTTP handler requires read and write access to session-state values. This is a marker interface and has no methods.

Another option was to use the IReadOnlySessionState interface (Specifies that the target HTTP handler requires only read access to session-state values. This is a marker interface and has no methods.)

Needless to say, there is a performance increase in the latter case and if your requirement is only to read Session state, then that would be the right choice

Recently, I felt the need for removing a project from the Visual Studio Start Page, so I Googled and would like to share the solution. Don’t forget to close visual studio before trying this out. This trick requires modification to registry, so if you are skeptical do make a backup of the registry before proceeding.

Start the registry :

Start > Run > regedit > HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0\ProjectMRUList

Then delete the key that has the project you want to remove.

Visual Studio > 9.0 > ProjectMRUList

Visual Studio > 9.0 > ProjectMRUList

Note:

  • The Project Keys are consecutive. So if you have 5 projects listed, and you delete the key for the 4th project ie File4, the 5th project (File5) will also not be shown. You will need to remain one of the keys so that the list remains consecutive.
  • The same procedure can be repeated for the FileList and Find sections of the registry

Being a Web Developer, I don’t know whether to rejoice the addition of another browser or not? With all the hype of IE 8 ; Cross-Browser compatibility and now this, life sure is chaotic.

I am not going to blog about the new features of Google Chrome (We already have tons of them). It’s been analyzed that Chrome has been optimized for Google Applications and Services. Is that a bad thing??? Frankly, i don’t think so, cos admit it or not, every netizen is dependent on them. But i do welcome the Process-Thread architecture in Chrome, cos i had the same problem in both IE and Firefox.

We can all expect great things from Google, lets hope its the same with Chrome. Good luck to the development and Congrats on the Beta release.

7 really awesome things about Google Chrome : http://mashable.com/2008/09/03/awesome-google-chrome/

Google Chrome Introduction (Comic Book) : http://www.google.com/googlebooks/chrome/index.html

Tags: