Contents tagged with .NET

  • Display a Nice Error Popup Window - Extended

    Last time I blogged about how to display a nice error message to the user using only one line of declarative code. Today I want to show you how to extend that. Usually when you develop a Website you need to deal with exception either system or application specific exceptions. Pattern & Practices team have already provided us with a great exception handling application block which is part of Enterprise Library. I’m not going to write my own here, but rather integrate the Error Pop window with theirs.

  • Display a Nice Error Popup Window

    I always hated web sites that show Javascript alert message to tell the user about an error. Doing so make me feel that I'm in front of desktop application and not a web app. May be the alternative is to have an error page where you redirect the user in case of any error. This definitely works fine, but sometimes it bugs me when I get redirected to that error page just because my credit card number is wrong. Of course we can use the validation controls as a standard or with AJAX support to handle that.

  • SyntaxHighlighter Plug-in for Tinymce 3.X WYSIWYG Editor

    SyntaxHighlighter Plug-in for Tinymce 3.X is ready now. I don’t know why tinymce development team had to change the way of writing plug-in for the tinymce, they say it’s more modular.  What bothered me really is that there is no backward compatibility. That’s you must upgrade (Actually it’s rather migrate) your plug-in to the new way.

    Anyway, I have upgraded the plug-in I talked about here, to work on tinymce 3.x. To get it running on your site please use the attached file in this post and follow the same instructions on this blog entry.

  • Run CMD / Java application using C#

    Few days ago I needed to write a piece of code to call ANT file that builds some java files using the following CMD command ant –f build.xml. The process is rather straight forward task.  Use System.Diagnostics.Process that’s all, Easy.

  • NFA with Lambda Transition

    This semester I have a course about Automata, Formal Languages and Computability. It didn’t sound a good course for me at the beginning, but I after a while, I wished if I had this course before I did Compiler course back when I was doing my BCs. It was so hard for me to build a scanner for the compiler, we have had knowledge before though about FSA, but I think I didn’t grasp the whole picture back then.

  • Sending Email in C# (Sync/Async, Multiple recipients, Attachments, etc).

    This might seems a naive post about sending email, especially when there are hundreds of posts out there. However, most of these posts don't show a complete or comprehensive example for the beginners on how to send email with more options. I'm sure when you search for the phrase "Sending email using C#" you will find a plenty of results, but if you look closely you will see every post focuses on one thing perhaps attachment, multiple recipients, etc.