How to upload and download Media to or from MSSQL Server Database

This code shows you how to upload media files to the SQL Server Database to store it and then how to download it from the Database in your ASP.NET website using C#. First you have to create a database named “MediaDB” in your SQL Server. Then create a table named “MediaTable” in your newly created database. Now create 4 columns in “MediaTable” as given below- ID (int, not null, IsIndentity: Yes) FileName (text, allow nulls) MediaData (varbinary(MAX), allow nulls) Extension (text, allow nulls) Then save all. Now create a new Visual C# type website in your Visual Studio. Here is … Click here to continue…..

Why we use comments in C# code

Comments in coding plays a vital role when we work in a team or individual. Now we will get to know why to use comments while coding and how its help us. Now We will discuss about the benefits of comments in C# Normally, when we were were fresher in IT industry, completing the task given to us by our seniors or deeds which we used to set to do in particular day or duration. So during the phase when we were coding the steps and methods output we and God know, but after some weeks or month that codes … Click here to continue…..

What is the main difference between sub-procedure and function?

The sub-procedure is a block of multiple visual basic statements within Sub and End Sub statements. It is used to perform certain tasks, such as changing properties of objects, receiving or processing data, and displaying an output. You can define a sub-procedure anywhere in a program, such as in modules, structures, and classes. We can also provide arguments in a sub-procedure; however, it does not return a new value. The function is also a set of statements within the Function and End Function statements. It is similar to sub-procedure and performs the same task. The main difference between a function … Click here to continue…..

What are the different types of literals?

A literal is a textual representation of a particular value of a type. The different types of literals in Visual Basic are: Boolean Literals – Refers to the True and False literals that map to the true and false state, respectively. Integer Literals – Refers to literals that can be decimal (base 10), hexadecimal (base 16), or octal (base 8). Floating-Point Literals – Refers to an integer literal followed by an optional decimal point By default, a floating-point literal is of type Double. String Literals – Refers to a sequence of zero or more Unicode characters beginning and ending with … Click here to continue…..

Briefly explain the characteristics of reference-type variables that are supported in the C# programming language.

The variables that are based on reference types store references to the actual data. The keywords that are used to declare reference types are: Class – Refers to the primary building block for the programs, which is used to encapsulate variables and methods into a single unit. Interface – Contains only the signatures of methods, properties, events, or indexers. Delegate – Refers to a reference type that is used to encapsulate a named or anonymous method.