Monday 20 January 2020

Return JSON Object from API Controller

Return JSON Object from API Controller ASP.Net C# (MVC)


public IHttpActionResult GetNotification()
        {
            UserRepository ob = new UserRepository();
            List<NotificationAPIModel> data = new List<NotificationAPIModel>();
            data = ob.GetNotificationAPI("0", "2");

Sunday 19 January 2020

Answer : M1-R4: IT TOOLS & BUSINESS SYSTEMS Jan-2018

Answer  : M1-R4: IT TOOLS & BUSINESS SYSTEMS Jan-2018

1. Multiple Choice


1.1 : A
1.2 : A
1.3 : C
1.4 : A

Saturday 18 January 2020

Solved : M1-R4: IT TOOLS & BUSINESS SYSTEMS Jan-2018

Solved : M1-R4: IT TOOLS & BUSINESS SYSTEMS Jan-2018


1. Each question below gives a multiple choice of answers. Choose the most appropriate  one and enter in the “OMR” answer sheet supplied with the question paper, following instructions therein. (1x10)

1.1 : Binary equivalent of (53.625)10 is .
A)  (110101.101)2 B)  (111101.001)2
C)  (110111.100)2 D)  (100101.101)2
1.2 : FAT stands for________
A) File Allocation Table
B) Folder Allocation Table
C) Folder Allocation Transition
D) File Allocation Transition
1.3 : ____ operation of file or folder is required to move location of file or folder.
A) Copy followed by Paste
B) Cut followed by Paste
C) Move followed by Paste
D) Change location

Thursday 9 January 2020

Delete File C# ASP.Net

JS



function DeleteImage(path)
{
    if (confirm('Are you sure to delete this Image')) {

        var Userobj =
           {

           }

        $.ajax({

            url: '/WebsiteAdmin/DeleteAssociateImage?path=' + path,
            type: "POST",
            contentType: false, // Not to set any content header 
            processData: false, // Not to process data 
            data: JSON.stringify(Userobj),

            success: function (result) {
                //Update Extension
                if (result.sMessage == "1") {
                    alert("Image deleted Successfully");
                    location.reload();

Monday 6 January 2020

Select specified file from input type file using HTML

Select specified file from input type file using HTML


Input type file enables you to select any type of file by default but you can specify which file type will be selected. Following HTML input type file enable you to select image (JPG,PNG),Word and PDF file. 

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;
        
     }

Tuesday 19 November 2019

Putting model data in Viewbag



Putting Model in viewbag is the easiest way to flow A model data controller to a view. Let see a case, Suppose You’re editing a student record, On the editing page, you need to fill student details in related textbox and different type of dropdown list, which data is coming from database i.e. course , session, etc.

Normally we bind one model control to a view at a time. But if you are putting the model in a viewbag then you can transfer any number of models to a view. The following code will show you, Getting course record from the controller and filling it in the drop-down list at the view 


Model



public class CourseModel
    {
        public string ID { get; set; }
        public string CourseName { get; set; }
        public string Description { get; set; }
    }

Saturday 9 November 2019

Answer: M1-R4: IT TOOLS & BUSINESS SYSTEMS Jan-2017

Answer: M1-R4: IT TOOLS & BUSINESS SYSTEMS Jan-2017

Multiple Choice


1.1 : C
1.2 : B
1.3 : B
1.4 : B
1.5 : A
1.6 : B
1.7 : B
1.8 : B
1.9 : C
1.10 : B

True/False


2.1 : T
2.2 : T
2.3 : T
2.4 : T
2.5 : F
2.6 : T
2.7 : T
2.8 : T
2.9 : T
2.10 : T

Multiple Choice


3.1 : D
3.2 : H
3.3 : B
3.4 : F
3.5 : C
3.6 : I
3.7 : H
3.8 : E
3.9 : J
3.10 : M

Multiple Choice


4.1 : J
4.2 : H
4.3 : L
4.4 : M
4.5 : A
4.6 ; E
4.7 : D
4.8 : C
4.9 : F
4.10 : J

Friday 8 November 2019

Solved : M1-R4: IT TOOLS & BUSINESS SYSTEMS Jan-2017

Solved : M1-R4: IT TOOLS & BUSINESS SYSTEMS Jan-2017

1. Each question below gives a multiple choice  of   answers.Choose the most answer sheet supplied with the question paper, following instructions therein. (1x10)

1.1 : computer system are:
A) Memory, Input/Output, DMA
B) ALU, CPU, Memory
C) Memory, Input/Output, CPU
D) Control Circuits, ALU, Registers
1.2 : Which one of the following is volatile?
A) Bubble Memory
B) RAM
C) ROM
D) Magnetic Disc
Answer

Saturday 2 November 2019

Answer : M4.1-R4: APPLICATION OF .NET TECHNOLOGY July 2016

Answer :  M4.1-R4: APPLICATION OF .NET TECHNOLOGY July 2016


Multiple Choice : 


1.1 : A
1.2 : A
1.3 : B
1.4 : C
1.5 : B
1.6 : D
1.7 : A
1.8 : B
1.9 : D
1.10 : D

Sunday 20 October 2019

Solved : M4.1-R4: APPLICATION OF .NET TECHNOLOGY July 2016

Solved : M4.1-R4: APPLICATION OF .NET TECHNOLOGY  July 2016


1. Each question below gives a multiple choice of answers. Choose the most appropriate one and enter in the “OMR” answer sheet supplied with the question paper, following instructions therein.


1.1 : Web.config file is used ...
A) To store the global information and variable definitions for the application
B) To configure the web server
C) To configure the web browser
D) To configure the time that the server-side code-behind module is called
1.2 : Which of the following method must be overridden in a custom control?
A) The Paint() method
B) The Control_Build() method
C) The default constructor
D) The Render() method
Answer

Monday 14 October 2019

Solved : M3-R4: PROGRAMMING & PROBLEM SOLVING THROUGH ‘C’ LANGUAGE , July-2016

1. Multiple Choice


1.1 : B
1.2 : A
1.3 : B
1.4 : A
1.5 : A
1.6 : C
1.7  : C
1.8 : C

Thursday 10 October 2019

Solved : M3-R4: PROGRAMMING & PROBLEM SOLVING THROUGH ‘C’ LANGUAGE , July-2016

Solved : M3-R4: PROGRAMMING & PROBLEM SOLVING THROUGH ‘C’ LANGUAGE , July-2016

1. Each question below gives a multiple choice of answers. Choose the most appropriate one and enter in the “OMR” answer sheet supplied with the question paper, following instructions therein.


1.1 How many times below for loop will be executed?
#include<stdio.h> 
int main()
{
int i=0; for(;;)
printf("%d",i); return 0;
}

A) 0 times
B) Infinite times
C) 10 times
D) 1 times
Answer

Sunday 6 October 2019

Answer : Internet Technology and Web Design Question Paper (July-16)

Answer : Internet Technology and Web Design Question Paper (July-16)

1. Multiple Choice


1.1 : B
1.2 : B
1.3 : C
1.4 : B
1.5 : A
1.6 : B
1.7 : D
1.8 : B

Solved : Internet Technology and Web Design Question Paper (July-16)

Solved : Internet Technology and Web Design Question Paper (July-16)

Q 1 : Each question below gives a multiple choice of answers. Choose the most appropriate one and enter in the “OMR” answer sheet supplied with the question paper, following instructions therein. (1x10)

1.1 : FTP is
A) Server side encryption protocol
B) Control connection to remote computer to transfer files
C) User Datagram Protocol.
D) Authorization of a user through login and password verification.
Answer

Thursday 3 October 2019

Delete function using PHP Prepare statement using MySQL

Delete function using PHP Prepare statement using MySQL

function deleteBreaking($id)
{
ini_set('display_errors',1);
ini_set('display_startup_errors', 1);
mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
  $stmt = $this->conn->stmt_init();
  if ($stmt->prepare("delete from  breaking_news where id=?"))
  {
   $stmt->bind_param("i",$id);     
   $stmt->execute() or die("<h1>Error</h1>".mysqli_error($this->conn));       
   $stmt->close();   
   return "<span class='g-successMsg'>Breaking News Deleted Successfully</span>";;
  }
  else
  {
  
   return "<span class='errorMsg'>Oops ! Error in Deleting breaking news, Please try again later</span>";
  }  
}

Sunday 29 September 2019

Sloved : July, 2016 M1-R4: IT TOOLS AND BUSINESS SYSTEMS

Sloved : July, 2016 M1-R4: IT TOOLS AND BUSINESS SYSTEMS (NIELIT O Level)

Multiple Choice


1.1 :  A
1.2 : B
1.3 : A
1.4 : C

Monday 23 September 2019

July, 2016 M1-R4: IT TOOLS AND BUSINESS SYSTEMS

July, 2016 M1-R4: IT TOOLS AND BUSINESS SYSTEMS Solve

1. Each question below gives a multiple choice of answers. Choose the most appropriate one and enter in the “OMR” answer sheet supplied with the question paper, following instructions therein. (1x10)


1.1 : The basic architecture of computer was developed by
A)           John Von Neumann
B)           Charles Babbage
C)           Blaise Pascal
D)           Gorden Moore
Answer : 

1.2 : Which protocol provides e-mail facility among different hosts?
A)           FTP
B)           SMTP
C)           TELNET
D)           SNMP
Answer :

Monday 9 September 2019

Light Box Image Gallery


Light box image gallery

More than 50 percent light box gallery uses this.


<html>
<head>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
    <link href="lightbox.min.css" rel="stylesheet" />
    <script src="lightbox-plus-jquery.min.js"></script>
    <title>Girfa Light Box</title

Friday 6 September 2019

Update query | Prepare statement

MYSQL prepare query for update using PHP


function SavePaymentStatus($status,$refno)
{
$stmt = $this->conn->stmt_init();
if ($stmt->prepare("update rlss4 set id10=? where id2=?"))
{
$stmt->bind_param("ss", $status, $refno);
$stmt->execute() or die("<h1>Error</h1>".mysqli_error($this->conn));     
$stmt->close();
return true;
}
else
{
return false;
}
}

Sunday 25 August 2019

Google Recaptcha

Google Recaptcha

What is reCAPTCHA?




reCAPTCHA is a free service that protects your website from spam and abuse. reCAPTCHA uses an advanced risk analysis engine and adaptive challenges to keep automated software from engaging in abusive activities on your site. It does this while letting your valid users pass through with ease.

Tuesday 2 July 2019

Add image to server C#

this post will help you to upload a file to the server with a new name

HTML



<form>
    <input type="file" id="filelogo" class="fileUpload" accept="image/x-png,image/jpeg" /><br /><br />
  <input type="button" value="Upload" onclick="UploadImage('filelogo','new name')" >

 </form>

Java Script




function UploadImage(fnm,newname)
{
        var data = new FormData();
        data.append("filename", $("#"+fnm)[0].fil

Saturday 29 June 2019

Solved : January, 2015 M4.3-R4: INTRODUCTION TO ICT RESOURCES

Saturday 15 June 2019

Answer : July, 2015 M4.3-R4 INTRODUCTION TO ICT RESOURCES

Multiple Choice


1.1 : C
1.2 : B
1.3 : D
1.4 : A
1.5 : A
1.6 : C
1.7 : A
1.8 : B
1.9 : C
1.10 : B

True/Fase


2.1 : F
2.2 : T
2.3 : F
2.4 : T
2.5 : T
2.6 : F
2.7 : F
2.8 : T
2.9 : T
2.10 : F

Match the columns


3.1 : C
3.2 : E
3.3 : D
3.4 : B
3.5 : F
3.6 : K
3.7 : J
3.8 : L
3.9 : M
3.10 : I

Fill in the Blanks


4.1 : G
4.2 : E
4.3 : C
4.4 : J
4.5  : K
4.6 : M
4.7 : B
4.8 : D
4.9 : A
4.10 : F

Wednesday 5 June 2019

Copy Current url to clipboard using Javascript


function copyLinkWhatsup()
    {

        var dummy = document.createElement('input'),
          text = window.location.href;
        document.body.appendCh

Monday 3 June 2019

Put links in head section of view



When you work in ASP.Net MVC and you want to put links in head section but it appears after many links this is because head section code comes from shared layout. 

So if you want to add some links at the top in a view head section you need to make a render point in shared layout with a unique name and put your links inside of given name section.

Layout section 



@RenderSection("GCSS", required: false)
@RenderSection("og", required: false)


Razor/View Section