Wednesday, August 10, 2011

Find arthimatic operator in string by Using Regex


 function ArthimaticOperation(val) {
        //var str="45/52";
        var patt1=/[-|*|/|+]{1}/g;
        var operator=val.match(patt1);
        var temp = new Array();
        temp = val.split(val.match(patt1));
        var firstVal=temp[0];
        var secVal=temp[1];
        if(operator=='*')
            return firstVal*secVal;
        else if(operator=='-')
            return firstVal-secVal;
        else if(operator=='+')
            return firstVal+secVal;
        else if(operator=='/')
            return firstVal/secVal;
        else
            return val;

    }

Using Regex for Arthimatic operator in string

Thursday, August 4, 2011

Could not load file or assembly

(HRESULT: 0x80070057 (E_INVALIDARG)) on debug

Issue:
When trying to debug an ASP.net website in Visual Studio you get the following error message:

Could not load file or assembly 'your project' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))

Solution:
Clear out the temporary framework files for your project in:

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\

Update:

For Windows 7, the path is:
C:\Users\[username]\AppData\Local\Temp\Temporary ASP.NET Files\

For 64 bit systems with 'Framework' in the path the full path is:
C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\

Wednesday, August 3, 2011

ASP.Net Interview Question Answer

ASP.NET 3.5 interview question
http://aspnet2008.blogspot.com/

Introduction to Object Oriented Programming Concepts (OOP) and More
http://www.codeproject.com/KB/architecture/OOP_Concepts_and_manymore.aspx#Interface

C# Interview Questions
http://lionalblog.blogspot.com/