Pages

Wednesday, 8 December 2021

File compress client side by Java script before upload to server | C# ASP.Net


File compress facility is available in javascript and it's good practice to compress files client-side, before uploading to the server because it saves the resource of the Server time and internet bandwidth and increases the user file upload experience. 

Saturday, 20 November 2021

Generic List C#

 A generic list is a dynamic array-like structure used to store user information for any type of data . The list is one of the most powerful and useful data structures provided by C#. You can not imagine modern programming without a generic list because built-in programming capability makes a developer work easy. You will get some practical real-life programing practice from the list in this post.

public class Student

    {

        public string roll { get; set; }

        public string name { get; set; }

        public string city { get; set; }

    }

Sunday, 14 November 2021

Layout/Master page in laravel

Layout/Master page in laravel

Making Layout or Master page in laravel is very simple . Go through the given steps below.

Step 1: Make a view named Layout.blade.php

Make a view for layout named layout.blade,php in resources\views folder.

Friday, 12 November 2021

User difined function Laravel

 We make user difined function to reuse code. To use user difined function you need to follow the steps
given below.

  • Make your file in app folder and write your code in that file . In my case file name is helper.php and funtion name is Title . i.e.
function Title()
{
   echo "Girfa IT Services";
}
  • Goto  composer.json file and add the following lines in autoload section.In my case pagelib.php is my file. Write your file name.
        "autoload": 
        {
        "files" :["app/pagelib.php"],
        },
  • Now you can call the function inside of helper.php  file , anywhere in your project.
Note : Run given command  for update your function

          composer dump-autoload 

Then, in your hosting site, you can update two files, autoload_classmap.php and autoload_static.php, manually in vendor/composer folder. I prefer to copy and paste the added classes from local to the hosting server

Save form data into database

 This post will help  step by step to understand , how to save your HTML form data into Mysql Database.

Database Table structure 


Form

Step 1

Make  HTML Form , code is given below

<form method="post" action="index">

    @csrf

    Name : <input type="text" name="name" placeholder="Your Name" required class="form-control"><br>

    Phone : <input type="text" name="phone" required placeholder="Phone Number" class="form-control"><br>

    Message :

    <textarea rows="5" name="message" required placeholder="Message" class="form-control"></textarea><br>

    <input type="submit" value="Save" name="submit">

</form>


Step 2 


Create Model by given command

php artisan make:model stumodel 

Model Location :  app\Models

Model Code

<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class stumodel extends Model
{
protected $table = 'kashiquery';
    use HasFactory;
public $timestamps=false;
protected $fillable = [
'name', 'phone','message','createddate'
];
}

Step 3 : Create Controller


Create controller by given command below

Command : PHP artisan make:controller common

Controller location : app\Http\Controllers

Code

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Models\stumodel;
class common extends Controller
{
    public function AddData(Request $req)
{
        $data=new stumodel;
//$r = $req->input();
$data->name=$req["name"];
$data->phone=$req["phone"];
$data->message=$req["message"];
$data->createddate=date("Y-m-d");
$data->save();
return redirect('index');
    }
}
 

Step 4 : Configure Route


Route File Location : \routes\web.php 

<?php

use Illuminate\Support\Facades\Route;
use App\Http\Controllers\common;


Route::get('/', function () {
    return view('index');
});
Route::view('index','index');
Route::post('index',[common::class,'AddData']);





Thursday, 4 November 2021

Fill Menu items in partial view from database without using java script in C# ASP.NET MVC

 Fill Menu items in partial view from the database without using javascript in C# ASP.NET MVC.

Menu items from database


When there is a need to load menu items from the database, then you may have many options like load it from javascript. But the best load time is when you use Razor collaborate with C#. This post will help you to do the same. Follow the step-by-step instructions. I Guarantee that response time is the lowest than any other approach. 

Model

public class MenuModel

{

   public string ID { get; set; }

   public string MenuName { get; set; }

}

Saturday, 30 October 2021

Upload Laraver project to Godaddy Linux shared hosting using CPanel

 Follow the steps given below to upload your laravel project to Linux shared server with Cpanel in Godaddy.

Step 1:

 Move all files from public folder to your project root folder.

Friday, 29 October 2021

Laravel command for beginners

 

Create and run project using composer

composer create-project laravel/laravel your-project-name

cd your-project-name

Goto project folder i.e your-project-name

php artisan serve

Next Topic

Tuesday, 26 October 2021

Page wise record in SQL Server 10 records per page

 Get Page wise record in SQL Server 10 records each page


;with pagewise as

(

SELECT        ROW_NUMBER() OVER(ORDER BY id) AS rowno, ID, roww, name, city

FROM            Student ) select * from pagewise where rowno>9 and rowno<21 order by rowno

 

Next Topic

Save HTML Data from textBox in ASP.Net C# MVC

while  Submit HTML Content thorugh Form post method is now allowed because ASP.Net Stop IT to prevent RSS Attack So you will have to tell ASP.Net form to process HTML Data .. steps are given below .

Sunday, 24 October 2021

Session ASP.Net C#

 Set Session

Session["ID"] = "lorem";

Session["Amt"] = 123;

Saturday, 23 October 2021

Answer : PROGRAMMING & PROBLEM SOLVING THROUGH ‘C’ LANGUAGE , January 2021 | NIELIT O Level

Answer : PROGRAMMING & PROBLEM SOLVING THROUGH ‘C’ LANGUAGE , January 2021 | NIELIT O Level

1: Multiple Choice


1.1 : A
1.2 : C
1.3 : A
1.4 : A
1.5 : B
1.6 : A
1.7 : C
1.8 : No option given (Because  compile error in code )
1.9 : B
1.10 : C

Friday, 22 October 2021

Read INI file ASP.Net MVC C#

 Install ini reference 

> nuget install ini-parser
                or
PM> Install-Package ini-parser

Saturday, 16 October 2021

Solved : PROGRAMMING & PROBLEM SOLVING THROUGH ‘C’ LANGUAGE , January 2021 | NIELIT O Level

 Solved : PROGRAMMING & PROBLEM SOLVING THROUGH ‘C’ LANGUAGE , January 2021 | NIELIT O Level

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 Which of the following is not a valid variable name declaration ?
(A) int
(B) abc_int
(C) abc
(D) abc_abc 

Friday, 15 October 2021

Save file to server without java script C# ASP.Net

 In this post, you will learn, How to upload an image file to a server without using javascript or jquery. The file will be upload using C#. Unique File name  is generated with datetime string , you implement your logic for the file name. Given code is applicable in both C# MVC and ASP.Net both.

Name Space

using System.IO;


HTML

Wednesday, 6 October 2021

Show Date after Date gap in Date picker HTML

 This post help you to show date in date picker HTML form control from a given date gap. For example show date two date further from current date using HTML and JavaScript. 


Tuesday, 21 September 2021

Invoice / Commission Management

 



Brokerage Management is an online/offline desktop application. This application is useful for any business that needs an invoice, commission calculation, and customer/shop database management. Customized reporting helps in accounting and MIS purposes. The flexible structure easily fits any business. This software is tested and used by many businessmen and users are getting more business after using this software because the analysis is key to the success of any business. So we focus on enhance reporting for deep analysis purposes.  

Features

  • Tax Bill,GST,Vat etc.
  • Calculation of Commission / Incentive.
  • Customers database management.
  • Shop/Vendor database management.
  • Ledger for accounting purposes.
  • Sell Report/Purchase report.
  • Customized report with a powerful filter to get desire record.
  • MIS Software likes Facility.
  • High-level security of data.
  • Database backup management.
  • Intuitive and scalable flow.
  • Easy user interface.
  • UI Color management helps to work a very long time without affecting the eyes.

Live Video



Tuesday, 22 June 2021

Coming Soon HTML Cloud Animated Page

 Coming Soon HTML5 Cloud Animated Page.




Source Code

<!DOCTYPE html>

<html>

<head>

Friday, 18 June 2021

Solved IT Tools and Business Systems (Jan 2021)

 Solved IT Tools and Business Systems (Jan 2021) NIELIT O Level

Part one

Each question below gives a multiple choice of answer . choose the most appropriate one and enter in the "OMR" answer sheet upplied with the question paper , following therein.













Saturday, 12 June 2021

Stripe Integration with C# ASP .NET MVC Visual Studio 2013

 Stripe payment gateway integration in ASP.NET C# MVC using Visual Studio 2013



Stripe payment gateway is simple but documentation for integration is very complicated. Current integration documentation is written for .Net core and if your project is made with visual studio 2013, then it would be very complicated to integrate because no documentation is available for the version of VS 2013. So I have made this post which will help you to strip integration with ASP.Net MVC using C#.

Monday, 7 June 2021

Install NuGet Package in Visual Studio 2013 | Microsoft ASP .NET

 Install NuGet Package in Microsoft Visual Studio 2013 ASP.NET



Current NuGet package does not support default TLS version (1.1). This is by default in Microsoft Visual Studio 2013. So You cannot install packages from Nuget package console. If you want to install nugget package in visual studio 2013 , then you will have to update TLS version (1.1) by the command given below.

[Net.ServicePointManager]::SecurityProtocol=[Net.ServicePointManager]::SecurityProtocol-bOR [Net.SecurityProtocolType]::Tls12

Sunday, 23 May 2021

Answer : January 2020 Introduction to ICT Resources

 Answer : January 2020 Introduction to ICT Resources

1. Multiple Choice


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

Friday, 21 May 2021

Solved : January 2020 Introduction to ICT Resources

 Solved : January 2020  Introduction to ICT Resources

Part One

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 Where is POST located?
(A) DRAM
(B) Hard-drive
(C) RAM
(D) ROM

Thursday, 20 May 2021

Answer : Application of .NET Technology January 2020

 1. Multiple Choice

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

Monday, 17 May 2021

Solved : Application of .NET Technology January 2020

 Solved :  Application of .NET Technology January 2020

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=10)

1.1 : Which utility can be used to compile managed assemblies (like Dll’s and EXE) into native code ?
(A)    ngen (B)     gacutil
(C)    dumpbin (D)    ildasm

Saturday, 15 May 2021

Answer : January 2020 M4.2-R4: INTRODUCTION TO MULTIMEDIA

 Answer : January 2020  M4.2-R4: INTRODUCTION TO MULTIMEDIA

1. Multiple Choice


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

Wednesday, 12 May 2021

Solved : January 2020 M4.2-R4: INTRODUCTION TO MULTIMEDIA

 Solved : January 2020  M4.2-R4: INTRODUCTION TO MULTIMEDIA

Part One

(Answer All Questions)

1.Each  question below  gives  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=10)

1.1 : __________refers to any type of application or presentation that involves more than one type of media, such as text, graphics, video, animation, and sound.
(A) An executable file
(B) Desktop publishing
(C) Multimedia
(D) Hypertext

Saturday, 8 May 2021

Answer : Internet Technology and Web Design Question Paper (January-20)

 1. Multiple Choice


1.1 : B

1.2 : C

1.3 : A

1.4 : D

1.5 : A
1.6 : B
1.7 : B
1.8 : A
1.9 : C
1.10 : A

Execute Store procedure with command for SQL server

 Execute Store procedure with the command for SQL server

Syntax : 


exec procedure_name 'arg1','arg2','ar3',...'argN'

Thursday, 6 May 2021

Solved : Internet Technology and Web Design Question Paper (January-20)

 Solved : Internet Technology and Web Design Question Paper (January-20)

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=10)

1.1 : Which is the first Internet search engine?
(A) Google (B) Archie
(C) Altavista ((D) WAIS

1.2 : Who is making the Web standards?
(A) Mozilla
(B) Microsoft
(C) The World Wide Web Consortium
(D) NVDIA

Tuesday, 4 May 2021

Answer : IT Tools and Business Systems (Jan 2020) | NIELIT O Level

 Answer : IT Tools and Business Systems (Jan 2020)

1. Multiple Choice


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

Monday, 3 May 2021

Solved : IT Tools and Business Systems (Jan 2020)

 Solved : IT Tools and Business Systems (Jan 2020)

Part One

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=10)


1.1 : Which Decimal equivalent of the binary number 11100011is:
(A) 227 (B) 226
(C) 224 (D) 228

Friday, 30 April 2021

Implicit and Explicit type conversion | C Language

 Implicit and Explicit type conversion | C Language

Converting one data type into another data type is known as type conversion or typecasting. For example, converting character to number type integer. A waterfall model has been used for type conversion, which guaranteed that no loss of data while conversion.  If you convert the higher data type to a lower data type then data loss will occur, for example, conversion of long to an integer.

Implicit and Explicit type conversion | C Language




Implicit Typecasting

Implicit type casting means conversion of data types without losing its original meaning. This type of typecasting is essential when you want to change data types without changing the significance of the values stored inside the variable.

 

Tuesday, 27 April 2021

Advantage of Pointer | C Language

Advantage of Pointer

  • It provides dynamic programming environment.
  • Physical location of memory can be direct access through pointer.
  • It allow to call by reference to function which help to achieved many dynamic operation.
  • Dynamic memory allocation is achieved through array.
  • Fire read write operations are achieved through pointer.
  • Management of structures which are allocated memory dynamically is efficiently achieved by pointer.

Sunday, 25 April 2021

File read write function | C Language

1. ftell()

Returns the current file pointer position in numeric form. 

 Declarationlong ftell(FILE *stream);

 

 Remarks:

ftell returns the current file pointer for stream.If the file is binary, the offset is measured in bytes from the beginning of

the file The value returned by ftell can be used in a subsequent call to fseek.

 

 Return Value:

   On success, returns the current file pointer position.

   On error, returns -1L and sets errno to a positive value.

 

Example

 

    #include <stdio.h>

 

int main(void)

{

   FILE *stream;

 

   stream = fopen("MYFILE.TXT", "w+");

   fprintf(stream, "This is a test");

   printf("The file pointer is at byte %ld\n", ftell(stream));

   fclose(stream);

   return 0;

}

2. rewind()

Repositions file pointer to stream's beginning

 

 Syntax:

  void rewind(FILE *stream);

 

 Remarks:

rewind(stream) is equivalent to   fseek(stream, 0L, SEEK_SET) 

except that rewind clears the end-of-file and error indicators, while fseek

only clears the end-of-file indicator. 

After rewind, the next operation on an update file can be either input or

output.

 

Example

 

 #include <stdio.h>

 #include <dir.h>

 

 int main(void)

 {

    FILE *fp;

    char *fname = "TXXXXXX", *newname, first;

 

    newname = mktemp(fname);

    fp = fopen(newname,"w+");

    fprintf(fp,"abcdefghijklmnopqrstuvwxyz");

    rewind(fp);

    fscanf(fp,"%c",&first);

    printf("The first character is: %c\n",first);

    fclose(fp);

    remove(newname);

 

    return 0;

}

 

Next Topic

Thursday, 22 April 2021

Memory Allocation Function

 

1. Malloc

Full form of malloc function is memory allocate. malloc allocates a block of size bytes from the memory heap. It allows a program to allocate memory explicitly as it's needed, and in the exact amounts needed.

PHP 404 page handling

 

PHP 404 page handling

Server shows 404 error code when requested resource not found at server. By default, the browser display 404 error page .which is not as user-friendly because it does not show our website look and layout. if you want to custom 404-page handling page then this post will help you. to do the above let follows the steps given below.

Tuesday, 20 April 2021

Custom Error message | Hide Yellow Screen Of Death (YSOD) page in ASP .Net

ASP.Net MVC has a default error view in the Shared folder. which shows when any unexpected error arises. By default a fixed static error message display, No details of error shows. So if you want to show error details then this post will help you.




Yellow Screen Of Death (YSOD)

When an unhandled exception arises in an ASP.NET application one of three types of error pages is displayed: By default, ASP.NET displays an error page that is affectionately referred to as the Yellow Screen of Death (YSOD). YSOD showed some Sensitive information that can be used by attackers . Show its good practice to show custom error info in front of your users.

Setting in Webconfg file

<system.web>

    <compilation debug="true" targetFramework="4.7.2" />

    <httpRuntime targetFramework="4.7.2" />

       <trust level="Full" />

      

       <customErrors mode="RemoteOnly"

                      defaultRedirect="~/Shared/Error.cshtml" />

  </system.web>


Show error in custom error file



 @model System.Web.Mvc.HandleErrorInfo 

<div class="container">       

        <h1>Error.</h1>

        <h2>An error occurred while processing your request.</h2>

        <h3 style="color:red"><p style="color:red"> @Model.Exception.Message</p></h3>

        <br /><br />

    </div>

Next Topic