Category: HowTo

  • Logging and instrumentation

    Why There are at least two reasons for an application to register what tfhe user do. The first one and the most important is to see what is happening when a user has an error: what have been done,on which path did he go and what additional data(method parameters,usually) do you need for reproducing the…

  • ASP.NET MVC,ORM and ViewModels

    Since I am active on asp.net/mvc I find many peoples asking about One to many relationship . Dropdownlist How to use MVC with other ORM frameworks instead of Linq To Sql(L2S) ? What is a ViewModel and what is his purpose ? For answering,I have made a small application with MVC2 in order to detail…

  • ASP.NET MVC Extensions Methods

    These are my extensions. Not display dropdownlist if the Select list is null Transform Enum to SelectList Transform Generic list into a SelectList Display pager control Other extensions available that are good : http://blog.wekeroad.com/blog/asp-net-mvc-list-helper-extension-method/ http://www.hanselman.com/blog/ASPNETMVCSessionAtMix08TDDAndMvcMockHelpers.aspx http://helios.ca/2009/09/21/asp-net-mvc-extension-methods-of-urlhelper/ http://blog.donnfelker.com/2010/02/25/asp-net-mvc-tempdata-extension-methods/ http://inq.me/post/ASPNet-MVC-Extension-method-to-create-a-Security-Aware-HtmlActionLink.aspx If you know more,please tell me

  • Saving Setting for Windows Forms

    Saving and retrieving application settings Every application that I have made needs at minimum two things,that we will put on the generic term “ settings “: 1. “remember” their state – information that are read at the beginning,write at the end of the program . We will name those “local settings” because there are different…

  • Save settings – with a class that reads from or saves to app.config or web.config

    Step 1: Add reference to System.Configuration Step 2 :Derive your class from ConfigurationSection Step 3 : Put your values to be retrieved with ConfigurationProperty attribute Step 4: add a section to your config file and an entry Step 5 : read with ConfigurationManager.GetSection and convert to your class Download code See video

  • How To … Read database connection strings from app.config or web.config file

    Step 1 : Add a app.config file Step 2: Add the connection string Step 3: Add reference to system.configuration Step 4: Use the connection from ConfigurationManager.ConnectionsStrings   download visual studio solution        

  • How To … Create a new site similar with regular internet site in Windows 7

      Step 1 : Make a Web site with Visual Studio Step 2 : In IIS Manager create the new site Step 3: edit the hosts file (administrative rights) Step 4: Create the Web application,modify his Project=>properties=>Web =>Use local IIS Web Server Step 5: Edit bindings for new site to point to the folder of…

  • Window Forms tutorials

    You will find tutorials about loading a combo box from database,loading a treeview from database and how to transmit data between windows forms.   How to : fast fill a combobox with data from database How to : fast fill a combobox with data from database with Linq How To : load combo items from…

  • How to … test database code with BDD(NBehave)

    In this video,that is the continuation after How To … Test code from database with nunit   I will show how to transform a NUnit test into an BDD – NBehave test. As usual,you can download the code from here here  

  • How To … Test code from database with nunit

    In this video we will test the Business Layer for a shortening application. The Data Access Layer is made with Entity Framework . You can download files from here