Saturday, 20 May 2017

Unlock a table using sql server

// Sql Query

select * from  sys.dm_exec_requests

// Result





where status got suspended, get the session_id  of that and execute the query
Query-

kill 57

Related session_id rows status has been changed.

Write excel file and Download file from server using jquery

//

<html>
<head>
    <script>

<script src="//code.jquery.com/jquery-2.1.1.min.js"></script>
</head>
<body>
    <a id="lnk" href="data:text/csv;charset=utf-8, asdkjflks" download="FilePath\Exported%20Excel.xls">
        write and download file</a>
    <br>
 
    <script>
        try {
            $('#lnk').on('click', function () {
                window.runnerWindow.proxyConsole.log('The link was clicked')
            });
        }
        catch (error)
        { throw error; }
                //# sourceURL=yereg.js
    </script>
</body>

</html>

Download file from server using jquery

// Using html anchor tag

<html>
<head>
    <script>

<script src="//code.jquery.com/jquery-2.1.1.min.js"></script>
</head>
<body>

    <a id="lnk" href="FilePath\Exported%20Excel.xls"
        download="FilePath\Exported%20Excel.xls">download
        file</a>
    <script>
        try {
            $('#lnk').on('click', function () {
                window.runnerWindow.proxyConsole.log('The link was clicked')
            });
        }
        catch (error)
        { throw error; }
                //# sourceURL=yereg.js
    </script>
</body>

</html>

Monday, 15 May 2017

Set Default culture info in asp.net

//  Web.Config file

1.  Set Default cultue info using web.config file

<globalization requestEncoding="utf-8" responseEncoding="utf-8" fileEncoding="utf-8" culture="en-US" uiCulture="en-US" />

2.  Set Default cultue info using Aspx Page

<%@ Page uiCulture="en-US" culture="en-US" %>

3.  Set Default cultue info using web.config using auto select

<globalization requestEncoding="utf-8" responseEncoding="utf-8" fileEncoding="utf-8" culture="auto:en-US" uiCulture="auto:en-US" />

Thursday, 4 May 2017

Bootstap CSS for Radio button in using Font-Awesome


/// CSS

input[type=radio] {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}
   
input[type=radio] + label:before {
    font-family: FontAwesome;
    display: inline-block;
    content: "\f1db";
    letter-spacing: 10px;
    font-size: 1.2em;
    color: #535353;
}
input[type=radio]:checked + label:before {
    content: "\f00c";
    font-size: 1.2em;
    color: red;
    letter-spacing: 5px;
    width: 35px: 5px;
}
input[type=radio]:focus + label:before {
    font-weight: bold;
    color:orange;

}


// HTML

<div>
                    <input id="radio" name="question" type="radio">
                    <label for="radio">
                        Radio 1</label>
                </div>
                <div>
                    <input id="radio2" name="question" type="radio">
                    <label for="radio2">Radio 2</label>
                       
                  
                </div>


///  REsult



How to highlight selected text in notepad++

  –> To highlight a block of code in Notepad++, please do the following steps step-1  :- Select the required text. step-2  :- Right click...