LinqPad, A great tool to work and learn LINQ

by Vahid 30. January 2009 14:36

Want to learn LINQ? looking for a lightweigh and fast application to evaluate your linq expression? now check this out. i found a very good free application which lets you interactively query SQL databases in a modern query language: LINQ. LINQPad is also a great way to learn LINQ: it comes preloaded with 200 examples from the book, C# 3.0 in a Nutshell.  And finally LINQPad is more than just a LINQ tool: it's a code snippet IDE that instantly executes any C#/ expression, statement block or program. Put an end to those hundreds of Visual Studio Console projects cluttering your source folder! you can get it from here.

Tags: ,

.Net | Learning resource | Technical | Tools

Developing E-Commerce application in .NET

by Vahid 30. January 2009 03:34

if you want to develop and ECommerce application in .net, you should definitely check the post regarding a real eCommerce article. For sure it will help a lot.


.Net | Learning resource | Technical

Need Credit card numbers to test your E-Commerce site?

by Vahid 28. January 2009 03:24

one issue we usually face while developing an ECommerce application is testing credit card  payment system. so here is list of credit card numbers we can use to test payment system.

AmericanExpressAmerican Express: 3111-1111-1111-1117

VisaVisa: 4111-1111-1111-1111 or 4222-2222-2222-2222

masterCardMasterCard: 5111-1111-1111-1118 

DiscoverCardDiscover: 6111-1111-1111-1116

remember that  CCV number and Name does not matter but you should keep the amount bellow $500 dollars and also make sure expiration date is not today but in the future.




Name: Vahid Taslimi

Expiration Date: 0110

Amount: $486.65

Hope this helps.


Tags: ,

Learning resource | Technical

Java learning videos

by Vahid 25. January 2009 17:04

i just found a set of java and eclips learning videos. these are good mostely for begginers.

you can find them here

Tags: ,

Technical | JAVA | Learning resource

Comparision between C# and JAVA

by Vahid 25. January 2009 15:30


here is a quick comparision between microsoft c# (.net) and java 


Concept C# Java Notes
Virtual machine CLR JVM CLR is not quite the same as JVM concept, but very similar.
Namespace namespace/
C# allows multiple namespaces in a file, Java does not.
Attributes [attribute] @annotation C# 1.0, Java 1.5
Base class base super  
abstract objects abstract class abstract class  
abstract methods abstract abstract  
sealed objects sealed final In both cases, sealing is discouraged.
sealed methods sealed final  
replacement methods new keyword not supported Effectively ignores the base method.
constants const / readonly final static  
Enum's enum keyword enum keyword C# 1.0, Java 1.5
virtual functions explicit virtual always virtual This is one of the gotcha's when working between the two languages
override intention override @Override (though members override by default) Causes compiler error if method is not actually overriding a base method.
Class/Type representation of simple types Map 1:1 with the simple type keywords. Behave different to simple type keywords. C# seems more natural than Java in it's behavior
Getters/Setters get/set keywords, behave like properties Explicit get/set methods Again, C# seems more natural with this.
Events Typically via delegates Typically via interfaces  
Reference equivalence



== Another C# vs Java gotcha.
Value equivalence

== or



== for value types

Java's choice of using == for reference equals adds to the need to distinguish between objects and value types.
Object introspection Object.GetType() object.class Very similar
Exceptions thrown by method implicit throws keyword Actually liking Java's philosophy here, albeit taking some getting used to.
Stack scoping using keyword, or try/finally keywords  try/finally keywords 'using' keyword is syntax sugar that calls IDisposable.Dispose() method at end of block.
Simple synchronization lock keyword synchronized keyword 'synchronized' can also be used on a method.
Generics class<type> class<type> C# 2.0. Java 1.5. C# has a cleaner implementation and discovery of generics in reflection. In Java, class and class<type> cannot co-exist. class becomes synonymous to class<object>.
Output parameters out, ref Not allowed Not a huge loss in Java, there are simple workarounds.
Switch fall-through Not allowed Allowed  
iteration foreach(type x in y) for (type x : y) C# 1.0. Java 1.5.
Lambda/Closures => (future) C# 3.0. Java 1.7 (maybe)


Tags: ,

.Net | JAVA | Technical

export to excel but in new page

by Vahid 20. January 2009 05:42

in the last sub system which we were working on, there was requirement to export the result of a query which is from oracle database and is displayed in an data grid into excel file. but the component we are using for export to excel functionality gets the collection as input parameter and export the data to excel file and write the excel file into response object of the this means once the functionality is invoked, a dialog box will be displayed asking Open the file, save the file of cancel the operation. no issue with save and cancel. but when they clicked on the open it opens the excel file in the same browser window where they were viewing the page and they close the window once they were through with viewing the excel file. this means they close the application.

now they needed the excel file be opened in a new window so that they will not loos their application states. what we did to do so is a little bit tricky. in the query page when user clicks on export to excel button we save the data to be exported in an session state and open a new browser on the user's machine using following code :

BaseList<QueryInvoiceResult> result = GetInvoices(p);

Session["exceldata"] = result;


and we also moved the export to excel logic to the ExcelExport.aspx page



if (Session["exceldata"] != null)


BaseList<QueryInvoiceResult> result = (BaseList<QueryInvoiceResult>)Session["exceldata"];if (result.Count > 0)






catch (Exception)






"exceldata"] = null;




.Net | Technical

Why Grandma should not do sky diving

by Vahid 16. January 2009 05:59


Technorati Tags:



free lightweight source code editor

by Vahid 15. January 2009 07:27

Guys, looking for a free lightweight code editor? then you gatta check Programmer’s Notepad.

very nice and usefull tool to edit  and compile different kind of source code including : Assembly, C#, Java,, Javascript, Sql, pl/sql, CSS, C, C++, HTML, Fortran, XML, Pascal, Pear, PHP, PHP script, powershell, vbscript, Python, Ruby, Visual Basic and so many more. it has also a set of nice feature like :

  • Bookmarks (both numbered and plain)
  • Code Folding/Outlining
  • Docking tool windows - much better than those in version 1
  • Excellent external tool support with user-configurable
    output matching - click on errors and warnings to jump right to
    the place in the file where they were generated
  • Export to HTML (using CSS) and RTF
  • File association manager
  • In-file method/definition navigation (using Ctags)
  • No limit on file size (although large files may take a while
    to load)
  • Non fixed-width font support
  • Projects and Project Groups with multi-level folders and
    file system mirroring
  • Quick Search toolbar with links to Google and Google Groups
  • Regular expression search and replace
  • Support for unicode files
  • Support for windows, unix and macintosh file formats
  • Syntax highlighting for many languages through “schemes”.
  • Tabbed MDI interface
  • Text Clips
  • Unlimited number of schemes supported, powerful syntax
    highlighting supporting both user-defined and built-in schemes
  • User-defined schemes (XML)
  • Word-wrapping
  • i am sure you want to try this, so get it at




    patterns & practices Application Architecture Guide 2.0

    by Vahid 14. January 2009 07:29

    I have been waiting for this for long time. the first version has been really usefull for me.

    this is an official guied for application architecture provided by patterns and practicess team at microsoft. i hope this will be usefull for you also and let's thank the team for the greate job.

    Get it here

    Tags: , ,

    .Net | Technical

    Solution for CS0016 Error on ASP.NET and IIS7

    by Vahid 13. January 2009 16:37

    if you are also new to IIS7 like me and have tried to deploy an web site to IIS7, you must have faced the same problem i was facing which was so annoying. i was trying to deploy a web application to IIS7 running on vista home premium. deployment was ok, but when i was trying to access the site i was receiving the following error


    BuzzNet Tags: ,,

    CS0016: Could not write to output file 'c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\… ‘Access is denied.’

    i had no clue why this was happening as everything seemed to be ok for me.

    So, I figured, “OK this is probably a permissions issue” as I have encountered similar before in XP, where the ASPNET user account needed to be added. I also know that in Vista this account is called “NETWORK SERVICE”. I then update the permissions for the “Temporary ASP.NET Files” folder in the .NET Framework folder, eagerly get back to my browser, hit F5.. Boom. No dice, same error message.

    After doing some digging on the Internet I found out that

    I also need to set the permissions for the C:\Windows\Temp folder!

    To resolve, ensure your permissions are correct for both temp directories:

    • Browse to “C:\Windows\Microsoft.NET\Framework\{Vers.}\”.
    • Right click the “Temporary ASP.NET Files” folder.
    • Click “Properties”.
    • Click the “Security” tab.
    • Click “Edit” and confirm the UAC prompt.
    • Click the “Add” button.
    • In the “Enter Object Name” field, enter “NETWORK SERVICE”.
    • Click “Check Names”, it should become underlined to confirm it is OK.
    • Click OK.
    • With the “NETWORK SERVICE” user selected, in the "Permissions for..” list, check the “Full Control – Allow” check box.
    • Click “Apply” and “Yes” to the security prompt.
    • Finally click “OK” to close the properties dialog.
    • Repeat the above steps on the “C:\Windows\Temp” folder as well! (i.e. browse to “C:\Windows”, right click “Temp”, click “Properties” etc. etc.).

    security setting1

    To be honest, I wasn’t sure I believed it at first. But I deleted all temp files from both folders and reset/removed the permissions, and the error reared its ugly head again.

    I hope this helps any others with the same problem save time!


    .Net | Technical