Wednesday, November 25, 2015

Angular Patterns

ng-Pattern : We can use angular patterns to validate input type. adds the pattern validator to ngModel. It is most often used for text-based input controls, but can also be applied to custom text-based controls

Edit in plunkr

Steps involved
  • Specify input type
  • Specify the angular pattern in regular expression

Tuesday, November 24, 2015

Refresh Iframe

We can refresh and Iframe content using one line of code

Edit in plunker

document.getElementById('iframeid').src += '';

In this example we can reset the position of the map based on button click

Implementing TransactionScope

The TransactionScope class provides a simple way to mark a block of code as participating in a transaction, without requiring you to interact with the transaction itself.

Steps

  1. Add reference to System.Transactions                                                                             








Friday, November 20, 2015

Issue with installing protractor in windows

I was trying to install protractor in  windows 7. However I was no able to install it easily.
I have listed the steps which you need to perform in order to install protractor in windows 
npm install -g protractor
The step involves.
  1. Before running the above command install python 2.7.3 https://www.python.org/download/releases/2.7.3

Thursday, November 19, 2015

Logoff MVC

We cannot call logout function directly from an anchor tag or javascript .Reason they are supposed to be [HttpPost] with [ValidateAntiForgeryToken]

http://localhost:54673/Account/logOFF

we can achieve this by removing  [httpPost] and [ValidateAntiForgeryToken]

ASP ODBC Connection

In classic ASP we had the option to use odbc for connecting to the database. I had to use this in one of my project. I did not find any useful article on this.

Establishing ODBC connection for classic ASP

We can specify the odbc connection in ASP as shown below

Saturday, November 7, 2015

Performance through image optimization


What are different types of Image?

   GIF
  • Simple format
  • Only supports 256 formats
  • Supports animation
  • Initially patented