How to check internet connection in C#

Sometimes we need to know that our internet connection is available or nor. In using those code, you know that your internet connection  available or nor. This is a boolean function and this output true or false. If your internet connection lost that's message 'false' or have connection that message 'true'

How to upload multiple image in asp.net using C# and JQuery

We create many web application. Many application needs upload to multiple image. We are search in google for perfect solution. Something we got or nor.

There have a perfect solution for your project in visual studio with source file. You follow this article or bellow down and download source code.

At first download those essential file.
1. JQuery multiple file 
2. JQuery Download

Create a empty project in visual  studio and create a page like as Default,aspx or others name.


Default.aspx page code :

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>jQuery Upload multiple files in asp.net</title>
    <link href="Style.css" rel="stylesheet" />
    <script src="http://code.jquery.com/jquery-1.8.2.js"></script>
    <script src="jquery.MultiFile.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
        <div class="container">
            <asp:FileUpload ID="file_upload" class="multi" runat="server" />
            <asp:Button ID="btnUpload" runat="server" Text="Upload"
                OnClick="btnUpload_Click" /><br />
            <asp:Label ID="lblMessage" runat="server" />
        </div>
    </form>
</body>
</html>



Default.aspx.cs Page code

protected void btnUpload_Click(object sender, EventArgs e)
        {
            HttpFileCollection imageCollection = Request.Files;
            string folderPath = Server.MapPath("~/UploadFiles/");
            // check folder path or create
            if (!Directory.Exists(folderPath))
                Directory.CreateDirectory(folderPath);

            for (int i = 0; i < imageCollection.Count; i++)
            {
                HttpPostedFile uploadImage = imageCollection[i];
                string fileName = Path.GetFileName(uploadImage.FileName);
                if (uploadImage.ContentLength > 0)
                {
                    uploadImage.SaveAs(folderPath + fileName);
                    lblMessage.Text = imageCollection.Count + " Uploaded Successfully";
                }
            }
        }




Style.css CSS 

.container {
    width: 600px;
}

.MultiFile-label {
    padding: 10px;
    border: 1px solid #ccc;
}

.MultiFile-remove {
    float: right;
    font-size: 20px;
    margin: 5px 0;
}




You write those code correctly. Hope, it's work perfectly . You also download source code.




ASP NET Core Changes Every Developer Should Know

ASP.NET core has come, we start learning ASP.NET Core 1.0. I found a PDF book ASP.NET core changes.




If you a developer, please download this book. ASP.NET core cross platform and easy to learn

File Size: 5 MB Duration: 31 Pages



More resources: visualstudiomagazine.com

JSON Code Practice

JSON


JSON  means JavaScript Object Nation. We mostly use in alternative XML. JSON has lightweight data interchange format. We are easily understand JSON format and use very simple. We store data and easily display.