Saturday, 4 January 2020

Image file preview before upload using css

Image file preview before upload using css


Uploading Image file to the webserver is very common. We use HTML file type input for file upload, by default HTML file upload control doesn’t preview file. But if you want to show selected image file preview before upload and select only image file. Then this post is a complete solution for this. So enjoy coding with Girfa Student Help blog.


<html>
<head>
    <title>Preview file before upload</title>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
    <style>
        .fileUpload {
            position: relative;
            overflow: hidden;
           
            margin-top: 0px;
        }

            .fileUpload input.upload {
                position: absolute;
                top: 0;
                right: 0;
                margin: 0;
                padding: 0;
                font-size: 20px;
                cursor: pointer;
                opacity: 0;
                filter: alpha(opacity=0);
            }
    </style>
    <script>

Thursday, 26 December 2019

Encrypt password in SQL Server

This post will show you how can you encrypt/decrypt the password in SQL server 2012 fully using SQL Server store procedure.

Encrypt



        INSERT INTO AdminMaster ( Name,  UserName, Password, Status)

        VALUES('Girfa', 'girfa',EncryptByPassPhrase('key', '123')  , 1)

Sunday, 15 December 2019

Textbox jquery option

Textbox jquery option

Textbox enter keypress detection


$j('#txtDesignCode').keypress(function (event) {

    var keycode = (event.keyCode ? event.keyCode : event.which);
    if (keycode == '13') {
       alert('Enter key hit'); 
    }

});

Thursday, 21 November 2019

Auto suggestion MVC C# ASP.Net

Auto Suggestion of names using C# MVC ASP.Net with Ajax

CSS



<style>
     .g-auto {
         position: absolute;       
        
         border: solid 1px #e3e2de;
         background-color: #ffffff;
         -webkit-box-shadow: 0px 3px 13px -1px rgba(0,0,0,0.75);
         -moz-box-shadow: 0px 3px 13px -1px rgba(0,0,0,0.75);
         box-shadow: 0px 3px 13px -1px rgba(0,0,0,0.75);
         padding:0px;
         display:none;
        
     }