Friday 13 June 2014

Difference between @Html.TextBox, @Html.TextBoxFor & @Html.EditorFor

These are html helpers, which renders html input tag in which the type attribute is set to text.

@Html.TextBox("example")
 
This is the basic format of html helper for textbox. The html
 
 

@Html.TextBoxFor("example")

@Html.EditorFor("example")

Saturday 7 June 2014

Debugger not activated - Firebug

  • Open the Firebug window.
  • Click on the Firebug icon in the upper-left corner of the window and go to the menu item:
       Options > Reset All Firebug Options
  • Activate Firebug.

Friday 6 June 2014

The database '*\DATABASE1.MDF' cannot be opened because it is version 706. This server supports version 655 and earlier. A downgrade path is not supported. Could not open new database '*\DATABASE1.MDF'. CREATE DATABASE is aborted. (Microsoft SQL Server, Error: 948)

  • Version 706 is a database file from Sql Server 2012
  • Version 665 is a database file from Sql Server 2008R2



Tortoise workbench ignore certain files with hgignore

There may be cases where we want to ignore certain files before committing in mercurial distributed revision control system. We can ignore files using hgignore file.

  • hgignore file resides in the root folder.
  • Open the file
    • Right - click on file and open (CTRL + SHIFT + T). OR
    •  Take terminal from Repository tab and type 
      • thg hgignore
  •  If opened from the terminal

 
hgignore window


  •  Add file path or file extensions and add in the file.
  • It will take into effect after first commit.
  • After adding the restriction rules you can add hgignore file using
    • hg add .hgignore