Cheap and Reliable Hosting :: ASPHostPortal vs DiscountASP.NET ASP.NET 5 Hosting Comparison

IHostAzure.com | Cheap and Reliable ASP.NET 5 Hosting. Both having been dedicated to offering ASP.NET hosting for years, ASPHostPortal and DiscountASP.NET can match each other in many aspects, which causes difficulty for webmasters who’d like to make a choice between them. This comparison, therefore, is to make everything about them clear.

To compare them, we have reviewed and tested the pricing, ASP.NET hosting features and technologies, reputation, uptime, speed and technical support. The ratings below reveal the 2 companies’ edges and weaknesses toward each other. Details about each aspect are analyzed with real statistics.

ASPHostPortal vs DiscountASP.NET ASP.NET 5 Hosting Comparison

 [su_table]

Ratingasppds
Plan in ReviewASP.NETASP.NET
Price 5star 5star
Feature 5star rating
Loading Speed 5star rating
Uptime 5star rating
Support 5star rating
Customers Rating 5star rating

 [/su_table]

Pricing & Refund

ASPHostPortal have 3 plans named host one host two and host three. which are price from $5.00/mo, $9.00/mo and $14.00/mo regulary. As there is an up to 100%  FREE ASP.NET hosting with double SQL Space for people signing up by using the promotional link below. The plans can be upgraded anytime. Full refund is valid for the first 30 days

[su_frame align=”center”] Promotion Link FREE ASP.NET with Double SQL SPACE [su_button url=”http://asphostportal.com/Hosting-Promotions” style=”flat” background=”#dc2227″ radius=”round” icon=”icon: hand-o-up”]CLICK TO CLAIM[/su_button] [/su_frame]

DiscountASP.NET has been focusing on only 1 ASP.NET hosting plan – Base. The regular price of Base is $10/mo, but subscribers ordering through the promotional link can get a special price of $5/mo, 50% off. The cost is still affordable for ASP.NET hosting. Just like its competitor, DiscountASP.NET allows full refund for the initial 30 days, too.


Features

According to our investigation, ASPHostPortal and DiscountASP.NET  have the same advanced technologies. Both of them utilize Windows 2008/2012, MSSQL 2012/2014, IIS 7/8, ASP.NET 4.5.1/5 ASP.NET MVC 5/6, Classic ASP, and the latest versions of many other features.

However, when it comes to server resources, DiscountASP.NET lags behind much. The Base plan includes only 1000 MB disk space and 80 GB bandwidth, while even the Basic plan of ASPHostPortal comes with 5 GB disk space and 60 GB bandwidth. For a clear comparison, we have listed the main features of Base and Basic in the following table.

ASPHostPortal vs DiscountASP.NET ASP.NET 5 Hosting Comparison

 [su_table]

Featureasppds
Plan in ComparisonHost OneBase
Disk Space5 GB1000 MB
Bandwidth60 GB80 GB
Full TrustYesYes
Isolated Application PoolYesYes
Control PanelPleskPanelCustom Control Panel
MySQL 5YesYes
Email Accounts200500
Daily Backup Yes No
ConclusionRecommendedRecommended

 [/su_table]

[su_box title=”ASPHostPortal vs DiscountASP.NET ASP.NET 5 Hosting Comparison” box_color=”#23c3da”]

ASP.NET Hosting Uptime & Speed

ASPHostPortal has multiple data centers in (US (Washington & Seattle), Netherlands (Amsterdam), Singapore, Hong Kong, United Kingdom (London), Australia (Melbourne), France (Paris), Germany (Frankfurt)).You can be rest assured that your websites or dedicated servers are secured, managed and monitored in a state-of-the-art facility, and as a customer you have access to our engineers and the most reliable Support team.

DiscountASP.NET mainly serves demands in UK and US by using state-of-the-art data centers in these 2 countries. The company places Dell PowerEdge servers with RAID 10 disk arrays and 16-32 GB RAM in the data centers to deliver the best possible performance. Both data centers are equipped with 24×7 security and monitoring. Complete power redundancy is also utilized.

Technical Support

Both of ASPHostPortal and DiscountASP.NET have an email ticket system which allows customers to send support requests when they are troubled. All issues are expected to gain a solution within 24 hours. What sets the 2 companies apart in support is that ASPHostPortal has one more communication channel – live chat, which is convenient and efficient for resolving hosting problems.

[su_note note_color=”#111415″ text_color=”#ffffff” radius=”20″]

Conclusion

Based on our research into the 2 providers’ advantages over each other and their differences on the user base, both of them are excellent ASP.NET 5 hosting providers that are reliable, responsible and affordable. However, the differences indicate that ASPHostPortal is a better option for people running websites for business needs or personal interests, and DiscountASP.NET is more suitable for web developers

[/su_note]

[/su_box]

 

Cheap and Reliable Hosting :: How did we choose the Best ASP.NET web hosting providers?

IHostAzure.com | Cheap and Reliable ASP.NET Hosting. Find the best ASP.NET Web Hosting company from our recommended list of good ASP.NET  web hosts below. These hosts offer good asp.net hosting plans and are feature rich.

ASPHostPortal signup

$5.00/month

  • Best Small Business Shared Hosting                                                                                                                                                     
  • Unlimited Sites                                        
  • Windows 2008/2012
  • ASP.NET v. 5/4.5.2/4.5.1
  • 24/7/365. Technical Support.
  • 30-Days Money Back Guarantee

Applied Innovations signup

  $8.33/month

  • Host 2 domains 
  • ASP.net v2.0, v3.5                       
  • Supports MS SQL 2008 & 2005
  • Full Remote Delegation
  • 24/7/365. Technical Support.

ORCSWeb signup

   $69/month

  • Best Small Business Shared Hosting 
  • Superb support                                          
  • SQL Server Reporting Services (SSRS)
  • ASP.NET v2.0/v3.5/v4.0
  • ASP.NET MVC 2.0
  • ASP.NET AJAX

EasyASPHosting signup

  $4.99/month  

  • 24 x 7 x 365 Technical Support                                                                                                                                                            
  • MS Access, mySQL; MS SQL(available)
  • HELM Web Hosting Control Panel
  • 30 day money back

How did we choose the Best ASP.NET web hosting providers?

Important qualifying factors like best ASP.NET and windows hosting features, customer support and satisfaction, price factor, reliability, uptime statistics and techical support were taken into consideration. For details, please read web hosting review of each company. Review covers relevant techincal information as well as price details. Discounts and coupons, if available are listed as well. Please see our star rating as well. Better star rating indicates a better hosting company.

A Checklist for finding good ones

Are you considering moving away from your current hosting provider? Frustrated with lack of features and empty promises? Following check list may help you choose right one. Here is it.

Great Tech support:

This is the most important one in your checklist. Without quality customer support, especially tech support, you are handicapped. Make sure both customer support and tech support are great and have won good ratings (ASPHostPortal ) and reviews. Check out our asp.net hosting comparison chart above. This is a list of Top 4 ASP.NET Hosting providers.

ASP.NET features and checklist:

If you are hosting a asp.Net app, ASP .NET version is important for you. Make sure your windows web hosting provider has support for the version your app was developed in. Nowadays most of them do support v2, v3 , v3.5 , v4, v4.5 and v5 . Also check if you have support for LINQ / Silverlight etc for newer versions 3.x

Reliable Servers and Data Centers

Make sure your asp.net web hosting provider offers a good up time guarantee(99.x%). Nowadays most of them do, but you can see they fail miserably. Ensure this by reading reviews and seeing ratings. Our Top ones in the list above, offer reliable hosting. If you are hosting in USA, naturally, prefer hosting companies with data centers in USA

Other important features to consider:

Number of email accounts permitted, Dedicated Application Pools, Free ASP Components , Perl, CGI, SSI support, Streaming Audio/Video etc

Summary:

These checkpoints should help you evaluate a good ASP.NET hosting company. Make sure to see our recommendations above for ASP.NET Hosting. Reviews, ratings and recommedations are covered.

Cheap and Reliable Hosting :: TOP 3 ASP.NET Hosting Companies in Europe

IHostAzure.com | Cheap and Reliable ASP.NET Hosting. There are really few ASP.NET hosting solution in the industry. Maintaining a reliable ASP.NET server needs more patience and skills than running a Linux server. You could host your web site developed in ASP.NET from your personal computer, provided that you have a robust broadband Internet connection, sufficient provisioning from your Internet provider for the broadband traffic that will result from access to your web site and a configured home router that will allow incoming web requests. Both Internet Information Services (IIS) and the .NET framework would have to be installed and configured on your personal computer.

Finding web hosting that matches all of your needs might sometimes seem as a difficult task. To choose the best ASP.NET hosting in Europe for your ASP.NET websites, I recommend you going with the best ASP.NET hosting as following. These days, you can sign up for web hosting services based just about anywhere in the world. But for security and peace of mind, nothing is better than knowing that a European web host is on your side. Not only do you know exactly where your web host is located, but everything is easier – transactions take place in your local currency, the support team is in your time zone (and in your language).
After reviewing hundreds of web hosting, I finally name HostForLIFE.eu as 2015 Best ASP.NET Hosting service providers in Europe. HostForLIFE.eu is Microsoft No #1 Recommended Windows and ASP.NET Hosting in European Continent. Our service is ranked the highest top #1 spot in several European countries, such as: Germany, Italy, Netherlands, France, Belgium, United Kingdom,Sweden, Finland, Switzerland and many top European countries.

hfl

Why Choose HostForLIFE.eu ?

logo (2)HostForLIFE –  HostForLIFE receives Spotlight Status merit award for providing Recommended, Cheap & Fast ASP.NET 4.5 and MVC 5 Cloud Hosting from the leading technology company, Microsoft. HostForLIFE.eu claims to be the fastest growing Windows and ASP.NET Hosting provider in European continent. With the servers located in Amsterdam (The Netherlands), HostForLIFE.eu caters its clients with the newest servers on Dual Xeon Processor, minimum 8 GB RAM, and the fastest 1000 Mbps connection line. All the servers are equipped with the latest Windows Server 2012 R2, SQL Server 2014, ASP.NET 4.5.1, ASP.NET MVC 5.0, Silverlight 5, WebMatrix and Visual Studio Lightswitch. Security, reliability, and performance are at the core of their hosting operations to ensure each site and/or application hosted on their servers is highly secured and performs at optimum level.  As one of the European ASP.NET hosting providers, HostForLIFE guarantees 99.9% uptime and quick loading speed. From € 3.00/month , HostForLIFE provides you with unlimited disk space, unlimited domains, unlimited bandwidth,etc, for your website hosting needs.

For Alternative ASP.NET Hosting in Europe

1231123-Reg123-Reg is a UK based web hosting company and as the name suggests, it’s focused on offering cheap domain names. Despite this, the company does offer a wide range of web hosting plans, including email hosting, cloud hosting, VPS and dedicated hosting.The Startup Package from € 3.03/month with 1 Free .co.uk domain, 1GB Diskspace, 10 Sub-Domains, FTP Access, etc. All of the 123-Reg hosting plans provide access to UK-based support and live chat support during office hours. There is also a support desk for customers which provides user guides, FAQ’s, live system status and video tutorials. There is also a 123-Reg self diagnosis tool to help solve common web site issues, plus a knowledgebase for self-help and reference.

webfusionWebfusion– Webfusion (formerly GX Networks) is a website hosting, email and domain name registrar company. It began by offering internet services to corporations and began trading under the GX name in 1997. It believed that it had developed the first transatlantic IP backbone running native ATM. Webfusion originally started out with major Network Access Points in Washington and San Jose in the US, London’s LINX and Stockholm in Europe. Starting at € 10.95 per month, GearHost offers ASP.NET hosting on the market, Webfusion offer unlimited Web Space & Traffic, unlimited email account, unlimited ftp account, etc.

Conclusion

Whether you’re looking to launch a web application without hiring a full IT department, or you’re in IT and you just want to be sure you can handle large traffic spikes, a cloud hosting service can help you sleep at night, knowing your latest creation is running as it should

Cheap and Reliable Hosting :: TIPS for Ajax Developers in ASP.NET MVC

IHostAzure.com | Cheap and reliable ASP.NET MVC hosting. This is another quick blog post for the ASP.NET developers, who’re using ajax (or are going to use the ajax in their applications for async calls for the data to the server), and might be getting confused in the View-part of the MVC pattern. This blog post, would try to tip them up with a simple method of creating ajax functionality in their applications, and how to get the confusion about View-part clear. The background to this post is a question, that arose, of how to use the ajax to get the data in ASP.NET MVC framework. Although that was a simple task, but I know new developers get into trouble in making the logic, that is why I am writing this blog post, to explain the core-concept of the behaviour.

Getting hands dirty in some ASP.NET code

First stage would be to write the back-end code for our application, which is the ASP.NET MVC application. Wait, the first thing I want to elaborate here is that ajax requests don’t usually require you to send entire HTML markup, to be rendered. Usually, ajax requests are used to download just a few details about the user, such as their name, their company name, or a little message such as success message for the process user has started. That is why, sending entire HTML markup would take a lot of time, and network size, by sending entire XML tree as HTML markup.

asp.net2.jpgThat is why, I am going to not-create any View in this project. But I am going to work with just a single Controller. That controller would be used to perform all of the actions, and after the controller has been made, I am going to use the Route mechanism to allow custom URLs in  application; which do not map to our actual HTML files on the application set up. Don’t worry, as the application would build up, the concept of this paragraph would start to get some gravity and you will understand it how did I do and what you would do in order to create your own Ajax running ASP.NET MVC application.

First of all, let us create a Controller. To create a controller, you can get some help from Visual Studio, click on the Controllers folder and Add Controller to it. Name it, what so ever you want to. I named it as AjaxController; to specify that it would control all of the ajax requests over HTTP protocol. Once that has been done, you can create your own action methods that would response to your own personal functions. I didn’t bother creating any complex task, instead I just simply created a function, named it as “CustomAction”. It would be used as the URL to our ajax handling web page.

Inside that page, you would write the following code, to handle it and provide the result to it. Like simple C# application, the functions can have any return data type and thus, in ASP.NET MVC application we can, instead of a View, return a string (or any other data type object) that would be sent down to the client as the response to his ajax request. It would be much simpler, and much shorter in structure.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace AjaxRequests_in_ASPNET_MVC.Controllers
{
   public class AjaxController : Controller
   {
      // GET: Ajax
      public string Index()
      {
         return "Not allowed";
      }

      // Our custom action, URL would be /ajax/customaction
      public string CustomAction()
      {
         // We're going to return a string, not a view.
         return "Hello world, using Ajax in ASP.NET MVC application.";
      }
   }
}

The above code would return a string, that can be then used as a response and rendered into the HTML or done what-so-ever with it.

Now let us change the routes to actually let the application run without having to use a web page that is a View inside the Ajax folder in our Views folder. Open the App_Start folder, and inside there open the RouteConfig file, and inside it. Write this new route.MapPath() function

// Create a new route, set the controller to "Ajax" and the remaining would be the Action
// Note that there are no Views in the Views folder to map to this location.
routes.MapRoute(
   name: "AjaxController",
   url: "Ajax/{action}",
   defaults: new {controller = "Ajax"}
);

Now this code would create a routing scheme in your application, and is able to let your application run without actually having to have a specific file at that location to run and handle the ajax request. In the above code, I am using the URLs of the type “/ajax/customajax“, in this URL ajax is a constant string value, used as a path, and then the customajax would be the action of the controller. When this URL would be called, ASP.NET would execute the CustomAjax action of the controller, and would return the string result inside the function.

TIPS for Ajax Developers in ASP.NET MVC

Performing the ajax code

The ajax code for this project is simple jQuery code to create an async request to the server, to download some more data. But before I share the code for the ajax request, I would like you to make a few changes in the _Layout.cshtml file of your project. The change is to include the jQuery library in the project, so that in the web page you can use the jQuery (because we will be using that layout). Add this line of code to your HTML markup’s <head> element.

<script src="~/Scripts/jquery-1.10.2.js"></script>

Now that the jQuery has been added to your HTML DOM, you can use this library in other pages which has this page set as their layouts, to make use of the jQuery syntax and other objects. I will be using the ajax.

The following code depicts the code used for an example ajax request

$(document).ready(function () {
   $.ajax({
      // The URL
      url: "ajax/customaction",
      // If the request was successfull; which will be, if it is not successfull check for errors
      success: function (data) {
         // Alert the data; it would be "Hello world, using Ajax in ASP.NET MVC application."
        alert(data);
      }
   });
});

Now once this code would run, it would try to make a call to the URL specified, in the above section we discussed how ASP.NET would handle that request using the routings and action methods, and then would return a single string value. It would finally alert the user with the string that would be returned. That would be a single ajax running application, which would return simple plain message to the user without any complex and large sized View.


No #1 Recommended ASP.NET MVC Hosting

ASPHostPortal.com

ASPHostPortal.com  is the leading provider of Windows hosting and affordable ASP.NET  MVC Hosting. ASPHostPortal proudly working to help grow the backbone of the Internet, the millions of individuals, families, micro-businesses, small business, and fledgling online businesses. ASPHostPortal has ability to support the latest Microsoft and ASP.NET technology, such as: WebMatrix, WebDeploy, Visual Studio 2015, .NET 5/ASP.NET 4.5.2, ASP.NET MVC 6.0/5.2, Silverlight 6 and Visual Studio Lightswitch, ASPHostPortal guarantees the highest quality product, top security, and unshakeable reliability, carefully chose high-quality servers, networking, and infrastructure equipment to ensure the utmost reliability.

HostForLIFE.eu

HostForLIFE.eu guarantees 99.9% uptime for their professional ASP.NET MVC hosting and actually implements the guarantee in practice. HostForLIFE.eu is the service are excellent and the features of the web hosting plan are even greater than many hosting. HostForLIFE.eu offer IT professionals more advanced features and the latest technology. Relibility, Stability and Performance of  servers remain and TOP priority. Even basic service plans are equipped with standard service level agreements for 99.99% uptime. Advanced options raise the bar to 99.99%. HostForLIFE.eu revolutionized hosting with Plesk Control Panel, a Web-based interface that provides customers with 24×7 access to their server and site configuration tools.

DiscountService.biz

DiscountService.biz is The Best and Cheap ASP.NET MVC Hosting. DiscountService.biz was established to cater to an under served market in the hosting industry web hosting for customers who want excellent service. DiscountService.biz guarantees the highest quality product, top security, and unshakeable reliability, carefully chose high-quality servers, networking, and infrastructure equipment to ensure the utmost reliability. DiscountService.biz has ability to support the latest Microsoft and ASP.NET technology, such as: WebMatrix, WebDeploy, Visual Studio 2015, .NET 5/ASP.NET 4.5.2, ASP.NET MVC 6.0/5.2, Silverlight 6 and Visual Studio Lightswitch. DiscountService.biz is devoted to offering the best Windows hosting solution for you.


Cheap and Reliable Hosting :: How To Draw Route Between Current Location and Destination On Google Maps in ASP.NET

IHostAzure.com | Cheap and Reliable ASP.NET Hosting. Today I will explains about how to draw route between current location and destination on google maps in ASP.NET. Let me to show you.

Please following this code

The following is my aspx:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
<html xmlns="http://www.w3.org/1999/xhtml">  
<head runat="server">  
    <title>Search Route Direction</title>  
    <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?sensor=false"></script>  
    <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyC6v5-2uaq_wusHDktM9ILcqIrlPtnZgEk&sensor=false">  
    </script>  
    <%--Getting User Current Location--%>  
    <script type="text/javascript">  
        if (navigator.geolocation) {  
            navigator.geolocation.getCurrentPosition(success);  
        } else {  
            alert("There is Some Problem on your current browser to get Geo Location!");  
        }  
        function success(position) {  
            var lat = position.coords.latitude;  
            var long = position.coords.longitude;  
            var city = position.coords.locality;  
            var LatLng = new google.maps.LatLng(lat, long);  
            var mapOptions = {  
                center: LatLng,  
                zoom: 12,  
                mapTypeId: google.maps.MapTypeId.ROADMAP  
            };  
            var map = new google.maps.Map(document.getElementById("MyMapLOC"), mapOptions);  
            var marker = new google.maps.Marker({  
                position: LatLng,  
                title: "<div style = 'height:60px;width:200px'><b>Your location:</b><br />Latitude: "  
                            + lat + +"<br />Longitude: " + long  
            });  
            marker.setMap(map);  
            var getInfoWindow = new google.maps.InfoWindow({ content: "<b>Your Current Location</b><br/> Latitude:" +  
                                    lat + "<br /> Longitude:" + long + ""  
            });  
            getInfoWindow.open(map, marker);  
        }  
    </script>  
    <%--Getting Route Direction From User Current Location to Destination--%>  
    <script type="text/javascript">  
        function SearchRoute() {  
            document.getElementById("MyMapLOC").style.display = 'none';  
  
            var markers = new Array();  
            var myLatLng;  
  
            //Find the current location of the user.  
            if (navigator.geolocation) {  
                navigator.geolocation.getCurrentPosition(function(p) {  
                    var myLatLng = new google.maps.LatLng(p.coords.latitude, p.coords.longitude);  
                    var m = {};  
                    m.title = "Your Current Location";  
                    m.lat = p.coords.latitude;  
                    m.lng = p.coords.longitude;  
                    markers.push(m);  
                    //Find Destination address location.  
                    var address = document.getElementById("txtDestination").value;  
                    var geocoder = new google.maps.Geocoder();  
                    geocoder.geocode({ 'address': address }, function(results, status) {  
                        if (status == google.maps.GeocoderStatus.OK) {  
                            m = {};  
                            m.title = address;  
                            m.lat = results[0].geometry.location.lat();  
                            m.lng = results[0].geometry.location.lng();  
                            markers.push(m);  
                            var mapOptions = {  
                                center: myLatLng,  
                                zoom: 4,  
                                mapTypeId: google.maps.MapTypeId.ROADMAP  
                            };  
                            var map = new google.maps.Map(document.getElementById("MapRoute"), mapOptions);  
                            var infoWindow = new google.maps.InfoWindow();  
                            var lat_lng = new Array();  
                            var latlngbounds = new google.maps.LatLngBounds();  
                            for (i = 0; i < markers.length; i++) {  
                                var data = markers[i];  
                                var myLatlng = new google.maps.LatLng(data.lat, data.lng);  
                                lat_lng.push(myLatlng);  
                                var marker = new google.maps.Marker({  
                                    position: myLatlng,  
                                    map: map,  
                                    title: data.title  
                                });  
                                latlngbounds.extend(marker.position);  
                                (function(marker, data) {  
                                    google.maps.event.addListener(marker, "click", function(e) {  
                                        infoWindow.setContent(data.title);  
                                        infoWindow.open(map, marker);  
                                    });  
                                })(marker, data);  
                            }  
                            map.setCenter(latlngbounds.getCenter());  
                            map.fitBounds(latlngbounds);  
                            //***********ROUTING****************//  
                            //Initialize the Path Array.  
                            var path = new google.maps.MVCArray();  
                            //Getting the Direction Service.  
                            var service = new google.maps.DirectionsService();  
                            //Set the Path Stroke Color.  
                            var poly = new google.maps.Polyline({ map: map, strokeColor: '#4986E7' });  
                            //Loop and Draw Path Route between the Points on MAP.  
                            for (var i = 0; i < lat_lng.length; i++) {  
                                if ((i + 1) < lat_lng.length) {  
                                    var src = lat_lng[i];  
                                    var des = lat_lng[i + 1];  
                                    path.push(src);  
                                    poly.setPath(path);  
                                    service.route({  
                                        origin: src,  
                                        destination: des,  
                                        travelMode: google.maps.DirectionsTravelMode.DRIVING  
                                    }, function(result, status) {  
                                        if (status == google.maps.DirectionsStatus.OK) {  
                                            for (var i = 0, len = result.routes[0].overview_path.length; i < len; i++) {  
                                                path.push(result.routes[0].overview_path[i]);  
                                            }  
                                        } else {  
                                            alert("Invalid location.");  
                                            window.location.href = window.location.href;  
                                        }  
                                    });  
                                }  
                            }  
                        } else {  
                            alert("Request failed.")  
                        }  
                    });  
                });  
            }  
            else {  
                alert('Some Problem in getting Geo Location.');  
                return;  
            }  
        }  
    </script>   
</head>  
<body>  
    <form id="form1" runat="server">  
    <table style="border: solid 15px blue; width: 100%; vertical-align: central;">  
        <tr>  
            <td style="padding-left: 20px; padding-top: 20px; padding-bottom: 20px; background-color: skyblue;  
                text-align: center; font-family: Verdana; font-size: 20pt; color: Green;">  
                Draw Route Between User's Current Location & Destination On Google Map  
            </td>  
        </tr>  
        <tr>  
            <td style="background-color: skyblue; text-align: center; font-family: Verdana; font-size: 14pt;  
                color: red;">  
                <b>Enter Destination:</b>  
                <input type="text" id="txtDestination" value="" style="width: 200px" />  
                <input type="button" value="Search Route" onclick="SearchRoute()" />  
            </td>  
        </tr>  
        <tr>  
            <td>  
                <div id="MyMapLOC" style="width: 550px; height: 470px">  
                </div>  
                <div id="MapRoute" style="width: 500px; height: 500px">  
                </div>  
            </td>  
        </tr>  
    </form>  
</body>  
</html>

 Now run the application.

I hope this article helpful for you. Happy Coding 🙂

Best Recommendation ASP.NET 5 Hosting

ASPHostPortal.com

asp

Cheap and Reliable Hosting :: How to Send Mail to Multiple Users Using Parallel Programming in ASP.NET

How to Send Mail to Multiple Users Using Parallel Programming in ASP.NET

IHostAzure.com| cheap and reliable ASP.NET 5 Hosting. Hi guys today I will sharing code about how to Send Mail to Multiple Users Using Parallel Programming in ASP.NET C#. Ok let me to show you.

The following is the table design from where I am fetching employee records.

Code

CREATE TABLE [dbo].[Employee](  
    [Emp_ID] [int] IDENTITY(1,1) NOT NULL,  
    [Name] [varchar](50) NULL,  
    [Email] [varchar](500) NULL,  
    [Designation] [varchar](50) NULL,  
    [City] [varchar](50) NULL,  
    [State] [varchar](50) NULL,  
    [Country] [varchar](50) NULL,  
 CONSTRAINT [PK_Employee] PRIMARY KEY CLUSTERED   
(  
    [Emp_ID] ASC  
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]  
) ON [PRIMARY]  
  
GO 

 The following is my aspx:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="SendMailToMultipleUsers.Default" %>  
<!DOCTYPE html>  
<html xmlns="http://www.w3.org/1999/xhtml">  
<head runat="server">  
    <title>Send Mail To Multiple Users in ASP.NET C#</title>  
</head>  
<body>  
    <form id="form1" runat="server">  
        <div>  
            <table style="border: solid 15px blue; width: 100%; vertical-align: central;">  
                <tr>  
                    <td style="padding-left: 50px; padding-top: 20px; padding-bottom: 20px;   
                            background-color: skyblue; font-size: 20pt; color: orangered;">  
                        Send Mail To Multiple Users in ASP.NET C#  
                    </td>  
                </tr>  
                <tr>  
                    <td style="text-align: left; padding-left: 50px; border: solid 1px red;">  
                        <asp:GridView ID="GridViewEmployee" runat="server" AutoGenerateColumns="False" Width="90%"  
                            BackColor="White" BorderColor="#3366CC" BorderStyle="None" BorderWidth="1px"  
                            CellPadding="4" GridLines="Both">  
                            <Columns>  
                                <asp:TemplateField HeaderText="Select">  
  
                                    <ItemTemplate>  
                                        <asp:CheckBox ID="chkSelect" runat="server" />  
                                    </ItemTemplate>  
                                </asp:TemplateField>  
                                <asp:BoundField DataField="Name" HeaderText="Employee Name" />  
                                <asp:BoundField DataField="Email" HeaderText="Email" />  
                                <asp:BoundField DataField="Designation" HeaderText="Designation" />  
                                <asp:BoundField DataField="City" HeaderText="City" />  
                                <asp:BoundField DataField="State" HeaderText="State" />  
                                <asp:BoundField DataField="Country" HeaderText="Country" />  
                            </Columns>  
                            <FooterStyle BackColor="#99CCCC" ForeColor="#003399" />  
                            <HeaderStyle BackColor="#003399" Font-Bold="True" ForeColor="#CCCCFF" />  
                            <PagerStyle BackColor="#99CCCC" ForeColor="#003399" HorizontalAlign="Left" />  
                            <RowStyle BackColor="White" ForeColor="#003399" />  
                            <SelectedRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />  
                        </asp:GridView>  
                    </td>  
                </tr>  
                <tr>  
                    <td align="right">  
                        <asp:Button ID="btnSendMail" Text="Send Mail" OnClick="btnSendMail_Click" runat="server" />  
                    </td>  
                </tr>  
            </table>  
        </div>  
    </form>  
</body>  
</html> 
using System;  
using System.Collections.Generic;  
using System.Linq;  
using System.Web;  
using System.Web.UI;  
using System.Web.UI.WebControls;  
using System.Data;  
using System.Data.SqlClient;  
using System.Net.Mail;  
using System.Net;  
using System.Threading.Tasks;  
  
namespace SendMailToMultipleUsers  
{  
    public partial class Default : System.Web.UI.Page  
    {  
        SqlDataAdapter da;  
        DataSet ds = new DataSet();  
        DataTable dt = new DataTable();  
  
        protected void Page_Load(object sender, EventArgs e)  
        {  
            if (!Page.IsPostBack)  
                this.BindGrid();  
        }  
  
        private void BindGrid()  
        {  
            SqlConnection con = new SqlConnection();  
            ds = new DataSet();  
            con.ConnectionString = @"Data Source=INDIA\MSSQLServer2k8; Initial Catalog=EmployeeManagement; Uid=sa; pwd=india;";  
            SqlCommand cmd = new SqlCommand("SELECT * FROM EMPLOYEE", con);  
  
            da = new SqlDataAdapter(cmd);  
            da.Fill(ds);  
            con.Open();  
            cmd.ExecuteNonQuery();  
            con.Close();  
  
            if (ds.Tables[0].Rows.Count > 0)  
            {  
                GridViewEmployee.DataSource = ds.Tables[0];  
                GridViewEmployee.DataBind();  
            }  
        }  
  
        protected void btnSendMail_Click(object sender, EventArgs e)  
        {  
            DataTable dt = new DataTable();  
            dt.Columns.AddRange(new DataColumn[2] { new DataColumn("Name", typeof(string)),  
                        new DataColumn("Email",typeof(string)) });  
  
  
            foreach (GridViewRow row in GridViewEmployee.Rows)  
            {  
                if ((row.FindControl("chkSelect") as CheckBox).Checked)  
                {  
                    dt.Rows.Add(row.Cells[1].Text, row.Cells[2].Text);  
                }  
            }  
  
  
            string body = "Hi This is test Mail.<br /><br />Thanks.";  
  
  
            Parallel.ForEach(dt.AsEnumerable(), row =>  
            {  
                SendEmail(row["Email"].ToString(), row["Name"].ToString(), body);  
            });  
        }  
  
        private bool SendEmail(string To, string ToName, string body)  
        {  
            try  
            {  
                MailMessage mm = new MailMessage("yourEmailID@gmail.com", To);  
                mm.Subject = "Welcome " + ToName;  
                mm.Body = body;  
                mm.IsBodyHtml = true;  
                SmtpClient smtp = new SmtpClient();  
                smtp.Host = "smtp.gmail.com";  
                smtp.EnableSsl = true;  
                NetworkCredential NetworkCred = new NetworkCredential();  
                NetworkCred.UserName = "yourEmailID@gmail.com";  
                NetworkCred.Password = "<YourGmailPassword>";  
                smtp.UseDefaultCredentials = true;  
                smtp.Credentials = NetworkCred;  
                smtp.Port = 587;  
                smtp.Send(mm);  
                return true;  
            }  
            catch (Exception ex)  
            {  
                return false;  
            }  
        }  
    }  
}

 Happy Coding

Cheap and Reliable ASP.NET 5 Hosting 2015

ASPHostPortal.com

ASPHostPortal.com is the leading provider of Windows hosting and affordableASP.NET 5 Hosting. ASPHostPortal proudly working to help grow the backbone of the Internet, the millions of individuals, families, micro-businesses, small business, and fledgling online businesses. ASPHostPortal has ability to support the latest Microsoft and ASP.NET technology, such as: WebMatrix, WebDeploy, Visual Studio 2015, .NET 5/ASP.NET 4.5.2, ASP.NET MVC 6.0/5.2, Silverlight 6 and Visual Studio Lightswitch, ASPHostPortal guarantees the highest quality product, top security, and unshakeable reliability, carefully chose high-quality servers, networking, and infrastructure equipment to ensure the utmost reliability.

HostForLIFE.eu

HostForLIFE.eu guarantees 99.9% uptime for their professional ASP.NET 5 hosting and actually implements the guarantee in practice. HostForLIFE.eu is the service are excellent and the features of the web hosting plan are even greater than many hosting. HostForLIFE.eu offer IT professionals more advanced features and the latest technology. HostForLIFE.eu has supported  ASP.NET 5,  Relibility, Stability and Performance of  servers remain and TOP priority. Even basic service plans are equipped with standard service level agreements for 99.99% uptime. Advanced options raise the bar to 99.99%. HostForLIFE.eu revolutionized hosting with Plesk Control Panel, a Web-based interface that provides customers with 24×7 access to their server and site configuration tools.

DiscountService.biz

DiscountService.biz is The Best and Cheap ASP.NET 5 Hosting. DiscountService.biz was established to cater to an under served market in the hosting industry web hosting for customers who want excellent service. DiscountService.biz guarantees the highest quality product, top security, and unshakeable reliability, carefully chose high-quality servers, networking, and infrastructure equipment to ensure the utmost reliability. DiscountService.biz has ability to support the latest Microsoft and ASP.NET technology, such as: WebMatrix, WebDeploy, Visual Studio 2015, .NET 5/ASP.NET 4.5.2, ASP.NET MVC 6.0/5.2, Silverlight 6 and Visual Studio Lightswitch. DiscountService.biz is devoted to offering the best Windows hosting solution for you.

Cheap And Reliable :: How to Create ModalPopUp Control in ASP.NET AJAX

Today we will learn about  How to Create ModalPopUp Control in ASP.NET AJAX. Let me to tell you step by  step..

details

Requirements

  • First we need to create a ModalPopUp control.
  • Perform the Data Validation.
  • Savi the data to the database.
  • Show the saved data in a GridView.

Database Table Structure

create table tbl_ModalPopUp_Sample  
(  
   ID int identity primary key,  
   UserName varchar(50),  
   Mobile_No bigint  
) 

 Procedure 

  • Design the Form.
  • For this design I am using the UserControl of ASP.Net.
  • Drag a Modal Popup to the form.
  • Sets its Property.
CancelControlID="btnClose" 
TargetControlID="LinkButton1"
BackgroundCssClass="modalBackground"  
DropShadow="True" 
PopupControlID="ModalBox" (The ID of the Panel or DIV) 
    <asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server"   
        CancelControlID="btnClose" PopupControlID="ModalBox"   
        TargetControlID="LinkButton1" BackgroundCssClass="modalBackground"   
        DropShadow="True">  
        </asp:ModalPopupExtender>  

 We must call the ID of the Panel or DIV at the ModalPopUp PopupControlID=” “ property that we want to show as the design of the ModalPopUp Control.

CSS Class For ModalPopUp

    .modalBackground  
     {         
         background-color: #336699;  
         filter: alpha(opacity=80);  
         opacity: 0.8;  
     }   
      
     .modalBackground:hover    
     {  
         background-color : #CC3300;  
     }  

After adding ModalPopUp

You will find this Page Directive at the page level after adding the ModalPopUp:

Layout of the design

Lay Out Of The Design

Complete Design

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Modal_Pooup_Control.ascx.cs" Inherits="Ajax_User_Controls_Modal_Pooup_Control" %>  
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>  
     <style type="text/css">  
         
        .Clear  
        {  
            clear:both;  
        }  
          
        .logButton  
        {  
          width: 100px;  
          height: 30px;  
          background-color: #FB5F67;  
          font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: bold; font-style: normal;   
            font-variant: normal; text-transform: capitalize; color: #FFFFFF;       
        }  
        a:hover {color:#FF00FF;}  
        a:link    {color:blue;}  
        a:visited {color:green;}  
        a:active  {color:yellow;}  
          
        input[type="submit"]:hover {  
    background:#0000FF;  
}  
  
        .LoginBox  
        {  
            margin: 10px;  
            height: 270px;  
            background-color: #FB5F67;  
        }  
        .Heading  
        {  
            margin: 10px;  
            height: 15px;  
            background-color: #FFFFFF;  
            font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-weight: bold; font-style: normal;   
            font-variant: normal; text-transform: capitalize; color: #6C6B6B;   
            text-align: center;  
            padding: 4px;  
        }  
  
        .InnerLogin  
        {  
            margin: 10px;  
            margin-right: 5px;  
            width: 320px;  
            height: 250px;  
            float: left;  
            background-color: White;  
        }  
        .NewUserBox  
        {  
            margin: 10px;  
            margin-left: 5px;          
            width: 330px;  
            height: 250px;  
            float: left;  
            background-color: White;  
        }  
  
        .ClickButton  
        {  
          width: 100px;  
          height: 30px;  
          background-color: #339933;  
          font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: bold; font-style: normal;   
          font-variant: normal; text-transform: capitalize; color: #FFFFFF;       
        }  
                 
         .ContentInside  
         {  
             margin: 10px;  
         }  
          
     .TextBoxSize  
         {  
             width: 200px;  
         }  
  
     .SmallTextBox  
         {  
            width: 100px;    
         }  
           
         .DropDownSize  
         {  
           width: 255px;  
           height: 23px;    
         }  
     .ContentMiddle  
         {  
             margin: 0px auto;  
             height: auto;  
             width: 500px;  
         }  
          
         .LeftHeading  
         {  
             font-family: Arial, Helvetica, sans-serif;  
             font-size: 14px;  
             font-weight: bold;  
             font-style: normal;  
             font-variant: normal;  
             text-transform: capitalize;  
             color: #CC3300;  
             text-align: left;  
         }  
  
     .SubHeadingLeft  
         {  
             margin: 10px;  
             height: 15px;  
             padding: 4px;  
             background-color: #999999;  
             font-family: Arial, Helvetica, sans-serif;  
             font-size: 12px;  
             font-weight: bold;  
             font-style: normal;  
             font-variant: normal;  
             text-transform: capitalize;  
             color: #FFFFFF;  
             text-align: left;  
         }  
  
    .SmallButton  
        {  
          width: 70px;  
          height: 30px;  
          background-color: #666633;  
          font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: bold; font-style: normal;   
          font-variant: normal; text-transform: capitalize; color: #FFFFFF;       
        }  
    .modalBackground  
    {         
        background-color: #336699;  
        filter: alpha(opacity=80);  
        opacity: 0.8;  
    }         
  
      .modalBackground:hover    
      {  
          background-color : #CC3300;  
          }  
         .style1  
         {  
             width: 20px;  
         }  
         .style3  
         {  
             width: 4px;  
         }  
         .style4  
         {  
             width: 5px;  
             color: Red;  
         }  
          
          
         .style5  
         {  
             width: 525px;  
         }  
          
          
         .style6  
         {  
             height: 34px;  
         }  
         .style7  
         {  
             width: 525px;  
             height: 34px;  
         }  
         .style8  
         {  
             height: 23px;  
         }  
          
          
         .style9  
         {  
             width: 136px;  
         }  
         .style10  
         {  
             height: 34px;  
             width: 136px;  
         }  
         .style12  
         {  
             height: 34px;  
             width: 20px;  
         }  
         .style14  
         {  
             height: 34px;  
             width: 4px;  
         }  
         .style15  
         {  
             width: 120px;  
         }  
          
          
    </style>  
<div class="Heading">  
    ModalPouUp Control</div>  
<div class="ContentInside">  
    <asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">  
    </asp:ScriptManagerProxy>  
</div>  
<div class="ContentInside">  
    <asp:UpdatePanel ID="UpdatePanel3" runat="server" UpdateMode="Conditional">  
    <ContentTemplate>  
    <table style="width:100%;">  
        <tr>  
            <td class="style1">  
                 </td>  
            <td class="style9">  
                 </td>  
            <td class="style3">  
                 </td>  
            <td class="style5">  
                 </td>  
            <td>  
                 </td>  
        </tr>  
        <tr>  
            <td class="style12">  
                </td>  
            <td class="style10">  
                Insert New Data</td>  
            <td class="style14">  
                :</td>  
            <td class="style7">  
                <asp:LinkButton ID="LinkButton1" runat="server">Procede</asp:LinkButton>  
            </td>  
            <td class="style6">  
                </td>  
        </tr>  
        <tr>  
            <td class="style1">  
                 </td>  
            <td class="style9">  
                 </td>  
            <td class="style3">  
                 </td>  
            <td class="style5">  
                 </td>  
            <td>  
                 </td>  
        </tr>  
    </table>  
    <asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server"   
        CancelControlID="btnClose" PopupControlID="ModalBox"   
        TargetControlID="LinkButton1" BackgroundCssClass="modalBackground"   
        DropShadow="True">  
        </asp:ModalPopupExtender>  
    </ContentTemplate>  
   </asp:UpdatePanel>  
</div>  
<div class="ContentInside" id="ModalBox" runat="server"    
      
    style="background-color: #0099CC; color: #FFFFFF; font-weight: bold; font-family: Cambria; font-style: normal; text-transform: capitalize">  
<asp:UpdatePanel ID="UpdatePanel1" runat="server">  
  <ContentTemplate>   
        <table style="width:100%;">  
            <tr>  
                <td class="style1">  
                     </td>  
                <td class="style15">  
                     </td>  
                <td class="style3">  
                     </td>  
                <td class="style4">  
                     </td>  
                <td>  
                     </td>  
                <td>  
                     </td>  
            </tr>  
            <tr>  
                <td class="style1">  
                     </td>  
                <td class="style15">  
                     </td>  
                <td class="style3">  
                     </td>  
                <td class="style4">  
                     </td>  
                <td>  
                     </td>  
                <td>  
                     </td>  
            </tr>  
            <tr>  
                <td class="style1">  
                     </td>  
                <td class="style15">  
                    User name</td>  
                <td class="style3">  
                    :</td>  
                <td class="style4">  
                    *</td>  
                <td>  
                    <asp:TextBox ID="txtUserName" runat="server" CssClass="TextBoxSize"></asp:TextBox>  
                </td>  
                <td>  
                     </td>  
            </tr>  
            <tr>  
                <td class="style1">  
                     </td>  
                <td class="style15">  
                     </td>  
                <td class="style3">  
                     </td>  
                <td class="style4">  
                     </td>  
                <td>  
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"   
                        ControlToValidate="txtUserName" ErrorMessage="* Enter UserName" ForeColor="Red"   
                        ValidationGroup="abc"></asp:RequiredFieldValidator>  
                </td>  
                <td>  
                     </td>  
            </tr>  
            <tr>  
                <td class="style1">  
                     </td>  
                <td class="style15">  
                    Mobile Number</td>  
                <td class="style3">  
                    :</td>  
                <td class="style4">  
                    *</td>  
                <td>  
                    <asp:TextBox ID="txtMobile" runat="server" CssClass="TextBoxSize"></asp:TextBox>  
                </td>  
                <td>  
                     </td>  
            </tr>  
            <tr>  
                <td class="style1">  
                     </td>  
                <td class="style15">  
                     </td>  
                <td class="style3">  
                     </td>  
                <td class="style4">  
                     </td>  
                <td>  
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"   
                        ControlToValidate="txtMobile" ErrorMessage="* Enter Mobile No" ForeColor="Red"   
                        ValidationGroup="abc"></asp:RequiredFieldValidator>  
                    <asp:RangeValidator ID="RangeValidator1" runat="server"   
                        ControlToValidate="txtMobile" ErrorMessage="* Minimum 10 Digit Mobile Number"   
                        ForeColor="Red" MaximumValue="9999999999" MinimumValue="1000000000"   
                        Type="Double" ValidationGroup="abc"></asp:RangeValidator>  
                </td>  
                <td>  
                     </td>  
            </tr>  
            <tr>  
                <td class="style1">  
                     </td>  
                <td class="style15">  
                     </td>  
                <td class="style3">  
                     </td>  
                <td class="style4">  
                     </td>  
                <td>  
                    <asp:Button ID="btnSave" runat="server" CssClass="ClickButton" Text="Save"   
                        onclick="btnSave_Click" ValidationGroup="abc" />  
                    <asp:Button ID="btnReset" runat="server" CssClass="ClickButton"   
                        onclick="btnReset_Click" Text="Reset" />  
                    <asp:Button ID="btnClose" runat="server" CssClass="ClickButton" Text="Close" />  
                </td>  
                <td>  
                     </td>  
            </tr>  
            <tr>  
                <td class="style1">  
                     </td>  
                <td class="style15">  
                     </td>  
                <td class="style3">  
                     </td>  
                <td class="style4">  
                     </td>  
                <td>  
                    <asp:Label ID="lblMessage1" runat="server" ForeColor="Red"></asp:Label>  
                </td>  
                <td>  
                     </td>  
            </tr>  
            <tr>  
                <td class="style1">  
                     </td>  
                <td class="style15">  
                     </td>  
                <td class="style3">  
                     </td>  
                <td class="style4">  
                     </td>  
                <td>  
                     </td>  
                <td>  
                     </td>  
            </tr>  
        </table>  
    </ContentTemplate>  
    </asp:UpdatePanel>    
</div>  
<div class="ContentInside">  
    <asp:UpdatePanel ID="UpdatePanel2" runat="server">  
    <ContentTemplate>  
    <table style="width:100%;">  
        <tr>  
            <td class="style8">  
            </td>  
            <td class="style8">  
                <asp:GridView ID="GridView1" runat="server" BackColor="White"   
                    BorderColor="#CC9966" BorderStyle="None" BorderWidth="1px" CellPadding="4"   
                    AllowPaging="True" onpageindexchanging="GridView1_PageIndexChanging"   
                    PageSize="5">  
                    <FooterStyle BackColor="#FFFFCC" ForeColor="#330099" />  
                    <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="#FFFFCC" />  
                    <PagerStyle BackColor="#FFFFCC" ForeColor="#330099" HorizontalAlign="Center" />  
                    <RowStyle BackColor="White" ForeColor="#330099" />  
                    <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" />  
                    <SortedAscendingCellStyle BackColor="#FEFCEB" />  
                    <SortedAscendingHeaderStyle BackColor="#AF0101" />  
                    <SortedDescendingCellStyle BackColor="#F6F0C0" />  
                    <SortedDescendingHeaderStyle BackColor="#7E0000" />  
                </asp:GridView>  
            </td>  
            <td class="style8">  
            </td>  
        </tr>  
        <tr>  
            <td>  
                 </td>  
            <td>  
                <asp:Label ID="lblMessage2" runat="server" ForeColor="Red"></asp:Label>  
            </td>  
            <td>  
                 </td>  
        </tr>  
        </table>  
    </ContentTemplate>  
   </asp:UpdatePanel>  
</div> 

 I will use LINQ to do the database operations.

add table

Complete C# Code

    using System;  
    using System.Collections.Generic;  
    using System.Linq;  
    using System.Web;  
    using System.Web.UI;  
    using System.Web.UI.WebControls;  
    using System.Drawing;  
      
    public partial class Ajax_User_Controls_Modal_Pooup_Control : System.Web.UI.UserControl  
    {  
        protected void Page_Load(object sender, EventArgs e)  
        {  
            LoadGridData();  
        }  
      
        private void LoadGridData()  
        {  
            try  
            {  
                using (DataClassesDataContext DbContext = new DataClassesDataContext())  
                {  
                    var Data = DbContext.tbl_ModalPopUp_Samples;  
                    //  
                    GridView1.DataSource = Data;  
                    GridView1.DataBind();  
                }  
            }  
            catch (Exception Exc)  
            {  
                lblMessage2.Visible = true;  
                lblMessage2.ForeColor = Color.Red;  
                lblMessage2.Text = " Application Error :  " + Exc.Message;  
            }  
      
            finally  
            {  
                //  
            }  
        }  
        protected void btnSave_Click(object sender, EventArgs e)  
        {  
            DataSave();  
        }  
      
        private void DataSave()  
        {  
            try  
            {  
                using (DataClassesDataContext DbContext = new DataClassesDataContext())  
                {  
                    tbl_ModalPopUp_Sample tbl = new tbl_ModalPopUp_Sample();  
                    tbl.UserName = txtUserName.Text;  
                    tbl.Mobile_No = Convert.ToInt64(txtMobile.Text);  
                    //  
                    DbContext.tbl_ModalPopUp_Samples.InsertOnSubmit(tbl);  
                    DbContext.SubmitChanges();  
                }  
                //  
                lblMessage1.ForeColor = Color.Blue;  
                lblMessage1.Text = "Data Saverd Successfully.";  
                //  
                ResetAll();  
                LoadGridData();  
            }  
            catch (Exception Exc)  
            {  
                lblMessage1.Visible = true;  
                lblMessage1.ForeColor = Color.Red;  
                lblMessage1.Text = " Application Error :  " + Exc.Message;  
            }  
      
            finally  
            {  
                //  
            }  
        }  
        protected void btnReset_Click(object sender, EventArgs e)  
        {  
            ResetAll();  
            lblMessage1.Text = "";  
            lblMessage2.Text = "";  
        }  
      
        private void ResetAll()  
        {  
            txtUserName.Text = "";  
            txtMobile.Text = "";  
        }  
      
        protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)  
        {  
            GridView1.PageIndex = e.NewPageIndex;  
            LoadGridData();  
        }  
    }  

 Run this application .. I hope this article helpful for you 🙂

Best Recommended ASP.NET 5 Hosting

ASPHostPortal.com

ASPHostPortal.com is Perfect, suitable hosting plan for a starter in ASP.NET 5 Hosting. ASPHostPortal  the leading provider of Windows hosting and affordable ASP.NET Hosting. ASPHostPortal proudly working to help grow the backbone of the Internet, the millions of individuals, families, micro-businesses, small business, and fledgling online businesses. ASPHostPortal has ability to support the latest Microsoft and ASP.NET technology, such as: WebMatrix, WebDeploy, Visual Studio 2015, .NET 5/ASP.NET 4.5.2, ASP.NET MVC 6.0/5.2, Silverlight 6 and Visual Studio Lightswitch, ASPHostPortal guarantees the highest quality product, top security, and unshakeable reliability, carefully chose high-quality servers, networking, and infrastructure equipment to ensure the utmost reliability.

HostForLIFE.eu

HostForLIFE.eu guarantees 99.9% uptime for their professional ASP.NET hosting and actually implements the guarantee in practice. HostForLIFE.eu is the service are excellent and the features of the web hosting plan are even greater than many hosting. HostForLIFE.eu offer IT professionals more advanced features and the latest technology. Relibility, Stability and Performance of  servers remain and TOP priority. Even basic service plans are equipped with standard service level agreements for 99.99% uptime. Advanced options raise the bar to 99.99%. HostForLIFE.eu revolutionized hosting with Plesk Control Panel, a Web-based interface that provides customers with 24×7 access to their server and site configuration tools.

DiscountService.biz

DiscountService.biz is The Best and Cheap ASP.NET Hosting. DiscountService.biz was established to cater to an under served market in the hosting industry web hosting for customers who want excellent service. DiscountService.biz guarantees the highest quality product, top security, and unshakeable reliability, carefully chose high-quality servers, networking, and infrastructure equipment to ensure the utmost reliability. DiscountService.biz has ability to support the latest Microsoft and ASP.NET technology, such as: WebMatrix, WebDeploy, Visual Studio 2015, .NET 5/ASP.NET 4.5.2, ASP.NET MVC 6.0/5.2, Silverlight 6 and Visual Studio Lightswitch. DiscountService.biz is devoted to offering the best Windows hosting solution for you.

Cheap And Reliable Hosting :: How to Loading Sequence of Master Page, Contents Page and User Control in ASP.NET 5

IHostAzure.com| Cheap and Reliable Hosting. In this article I will show the loading process sequence of a Master Page that contains a Contents Page and that Contents Page has a User Control in ASP.NET 5

Step 1:

  • Create a website named “Loading_sequence”.

   empty website

Step 2:

  • Add a Master Page named “MasterPage.master” within it by right-clicking on the website in “Solution Explorer” then choose “Add” -> “Add New Item”. master page
  • Create some events in the “.cs” file of the Master Page and add a “response.write()” method with unique text for monitoring the process of execution.
        protected void Page_PreInit(object sender, EventArgs e)  
        {  
           Response.Write("Master Page Pre Init event called <br/> ");  
        }  
        protected void Page_Init(object sender, EventArgs e)  
        {  
           Response.Write("Master Page Init event called <br/> ");  
        }  
        protected void Page_Load(object sender, EventArgs e)  
        {  
           Response.Write("Master Page Load event called <br/> ");  
        }  

    cs code

Step 3:

  • Add a Contents Page named “Default.aspx” within it by the right-clicking on the website in Solution Explorer then choose “Add” -> “Add New Item” and check the “Select master page” checkbox to attach the Master Page. web form
  • Select the Master Page name that you want to attach. select master page
  • Create some events in the “.cs” file of the Contents Page and add a “response.write()” method with unique text by which we can monitor execution as written in the Master Page.

     

    protected void Page_PreInit(object sender, EventArgs e)  
    {  
       Response.Write("Content Page Pre Init event called <br/> ");  
    }  
    protected void Page_Init(object sender, EventArgs e)  
    {  
       Response.Write("Content Page Init event called <br/> ");  
    }  
    protected void Page_Load(object sender, EventArgs e)  
    {  
       Response.Write("Content Page Load event called <br/> ");  
    }

    response page

Step 4:

  • Add a Web User Control named “WebUserControl.aspx” within it by right-clicking on the website in Solution Explorer then choose “Add” -> “Add New Item”.web user control
  • Create some events in the “.cs” file of the Web User Control and add a “response.write()” method with unique text for monitoring the execution as written in the Master Page and the Contents Page.

     

        protected void Page_PreInit(object sender, EventArgs e)  
        {  
           Response.Write("User Control Pre Init event called <br/> ");  
        }  
        protected void Page_Init(object sender, EventArgs e)  
        {  
           Response.Write("User Control Init event called <br/> ");  
        }  
        protected void Page_Load(object sender, EventArgs e)  
        {  
           Response.Write("User Control Load event called <br/> ");  
        }  

    User Control Load event

Step 5:

  • Add the Web User Control to the Contents Page then “Register Tag” and write the code to access the control by the “TagPrefix” and “TagName”.

   TagPrefix

Step 6:

  • Run the website to see the output.

  output

I hope this article helpful for you.

No #1 Recommended ASP.NET 5 Hosting

ASPHostPortal.com

ASPHostPortal.com  is the leading provider of Windows hosting and affordable ASP.NET Hosting. ASPHostPortal proudly working to help grow the backbone of the Internet, the millions of individuals, families, micro-businesses, small business, and fledgling online businesses. ASPHostPortal has ability to support the latest Microsoft and ASP.NET technology, such as: WebMatrix, WebDeploy, Visual Studio 2015, .NET 5/ASP.NET 4.5.2, ASP.NET MVC 6.0/5.2, Silverlight 6 and Visual Studio Lightswitch, ASPHostPortal guarantees the highest quality product, top security, and unshakeable reliability, carefully chose high-quality servers, networking, and infrastructure equipment to ensure the utmost reliability.

HostForLIFE.eu

HostForLIFE.eu guarantees 99.9% uptime for their professional ASP.NET hosting and actually implements the guarantee in practice. HostForLIFE.eu is the service are excellent and the features of the web hosting plan are even greater than many hosting. HostForLIFE.eu offer IT professionals more advanced features and the latest technology. Relibility, Stability and Performance of  servers remain and TOP priority. Even basic service plans are equipped with standard service level agreements for 99.99% uptime. Advanced options raise the bar to 99.99%. HostForLIFE.eu revolutionized hosting with Plesk Control Panel, a Web-based interface that provides customers with 24×7 access to their server and site configuration tools.

DiscountService.biz

DiscountService.biz is The Best and Cheap ASP.NET Hosting. DiscountService.biz was established to cater to an under served market in the hosting industry web hosting for customers who want excellent service. DiscountService.biz guarantees the highest quality product, top security, and unshakeable reliability, carefully chose high-quality servers, networking, and infrastructure equipment to ensure the utmost reliability. DiscountService.biz has ability to support the latest Microsoft and ASP.NET technology, such as: WebMatrix, WebDeploy, Visual Studio 2015, .NET 5/ASP.NET 4.5.2, ASP.NET MVC 6.0/5.2, Silverlight 6 and Visual Studio Lightswitch. DiscountService.biz is devoted to offering the best Windows hosting solution for you.

Cheap And Reliable Hosting :: Best Recommended 2015 ASP.NET 5 Hosting

What’s New In ASP.NET 5

ASP.NET 5 is a lean .NET stack for building modern web apps. We built it from the ground up to provide an optimized development framework for apps that are either deployed to the cloud or run on-premises. It consists of modular components with minimal overhead, so you retain flexibility while constructing your solutions.

ASP.NET 5 includes the following features:

  • New flexible and cross-platform runtime
  • New modular HTTP request pipeline
  • Cloud-ready environment configuration
  • Unified programming model that combines MVC, Web API, and Web Pages
  • Ability to see changes without re-building the project
  • Side-by-side versioning of the .NET Framework
  • Ability to self-host or host on IIS
  • New tools in Visual Studio 2015
  • Open source in GitHub

What’s ASP.NET 5 Hosting

ASP.NET web hosting is designed for running the websites developed by Microsoft ASP.NET technology and databases based on Windows server platform. We don’t suggest you host ASP.NET applications on Apache web server in Linux although Mono provides that capability. Because running websites in Microsoft technology on Microsoft platform is performance and reliability guaranteed.

ASP.NET makes building Web applications dramatically easier with far less code! ASP.NET is a set of technologies in the Microsoft? .NET Framework for building Web applications and XML Web services. ASP.NET pages execute on the server and generate markup such as HTML, WML, or XML that is sent to a browser.

Finally, the long awaited release of ASP.NET 5, i’m happy for annoucement release asp.net 5. .NET Framework 5 for all our hosting packages. It is a highly compatible, in-place update to the .NET Framework 4, 4.5 and 4.5.2. ASP.NET 5 has been re-imagined from the ground up to provide a faster development experience, best in class performance, full side-by-side support. ASP.NET 5 is clean and free of bugs and is a composable .NET stack for building modern web applications for both cloud and on-premises servers. ASP.NET 5, with the help of Visual Studio 2015, lets you create modern web applications. Modern web applications not only target all devices, including PCs, Macs, Tablets and smartphones, but also work with any browser or operating system.

To choose the cheap and reliable  ASP.NET hosting for your ASP.NET websites, we recommend you going with the cheap and reliable ASP.NET hosting, ASPHostPortal is the leading provider of Windows hosting and affordable ASP.NET 5 Hosting. The  price starts from $1.00 per month. To more information about ASP.NET 5 Hosting  please visit asphostportal.com.

Why Choose ASPHostPortal ?

  1. Build Your Website Use ASPHostPortal.com’s website building tools to get that special, customized look for your website. A nifty wizard will walk you through the process.
  2. All-inclusive prices unbeatable value Other companies promise cheap hosting, but then charge extra for setup fees, higher renewal rates, or promotional services. With ASPHostPortal.com, the listed price is the number you’ll pay, and you can expect a fully loaded, comprehensive suite of web services.
  3. Fast and Secure ServerASPHostPortal powerfull servers are especially optimized and ensure the best ASP.NET 5 performance. They are have best data centers on three continent and unique account isolation for security.
  4. Easy to Use and Manage ASPHostPortal.com webspace explorer lets you manage your website files with a browser. A control panel lets you set up and control your server functions with ease.

ASP.NET 5 Hosting


 

Host IntroHost OneHost TwoHost Three
Host 1 Site Host Unlimited SitesHost Unlimited SitesHost Unlimited Sites
1 GB Disk Space 5 GB Disk Space 15 GB Disk Space 50 GB Disk Space
10 GB Bandwidth60 GB Bandwidth150 GB Bandwidth500 GB Bandwidth
0 SQL Server db2SQL Server db4 SQL Server db6 SQL Server db
SQL Server 2008 / 2012 / 2014SQL Server 2008 / 2012 / 2014SQL Server 2008 / 2012 / 2014SQL Server 2008 / 2012 / 2014
0 MB SQL Server / db200 MB SQL Server / db500 MB SQL Server / db1000 MB SQL Server / db
0 MySQL db3 MySQL db6 MySQL db10 MySQL db
0 MB MySQL /db200 MB MySQL /db500 MB MySQL /db1000 MB MySQL /db
50 MB Email Space200 MB Email Space500 MB Email Space1000 MB Email Space
Starting from
$1.00
/month
Starting from
$5.00
/month
Starting from
$9.00
/month
Starting from
$14.00
/month
Order NowOrder NowOrder NowOrder Now

Cheap And Reliablle Hosting :: How To Merging Multiple DataTables Into Single DataTable Using ASP.Net C#

Data comes from multiple resources. Maybe sometimes it’s a similar data type but sometimes the information is different. Consider a bus reservation system with a different vendor from which similar bus seats are reserved and those are various sources. If the bus owner wants to see a single result set then we need to merge the data into a single set. Here i just giving a sample scenario, it also may be used for a different scenario.

Step-by-step how to merge multiple tables into a single table.

Step 1

Create an ASP.Net web application as in the following:
  1. “Start” – “All Programs” – “Microsoft Visual Studio”.
  2. “File” – “New Project” – “C#” – “Empty Project” (to avoid adding a master page).
  3. Provide the project a name such as “MergeMultipleDataTable” or another as you wish and specify the location.
  4. Then right-click on Solution Explorer and select “Add New Item” then select the Default.aspx page.
  5. Drag and drop three Grid Views to bind the records after joining the two tables.
Now the Default.aspx source code will be as follows:
    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Defafult.aspx.cs" Inherits="MergeMultipleDataTable.Defafult" %>  
      
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
      
    <html xmlns="http://www.w3.org/1999/xhtml">  
    <head runat="server">  
        <title></title>  
    </head>  
    <body style="background-color: Blue">  
        <h4 style="color: White">  
            Article by Vithal Wadje</h4>  
        <form id="form1" runat="server">  
        <div>  
            <h4 style="color: White">  
               DataTable First Records Before Merging  
            </h4>  
            <asp:GridView ID="GridView1" runat="server" CellPadding="4" ForeColor="#333333" GridLines="None">  
                <AlternatingRowStyle BackColor="White" />  
                <EditRowStyle BackColor="#7C6F57" />  
                <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />  
                <HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />  
                <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />  
                <RowStyle BackColor="#E3EAEB" />  
                <SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />  
                <SortedAscendingCellStyle BackColor="#F8FAFA" />  
                <SortedAscendingHeaderStyle BackColor="#246B61" />  
                <SortedDescendingCellStyle BackColor="#D4DFE1" />  
                <SortedDescendingHeaderStyle BackColor="#15524A" />  
            </asp:GridView>  
            <br />  
            <h4 style="color: White">  
                 DataTable second  Records Before Merging  
            </h4>  
            <asp:GridView ID="GridView2" runat="server" CellPadding="4" ForeColor="#333333" GridLines="None">  
                <AlternatingRowStyle BackColor="White" />  
                <EditRowStyle BackColor="#7C6F57" />  
                <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />  
                <HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />  
                <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />  
                <RowStyle BackColor="#E3EAEB" />  
                <SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />  
                <SortedAscendingCellStyle BackColor="#F8FAFA" />  
                <SortedAscendingHeaderStyle BackColor="#246B61" />  
                <SortedDescendingCellStyle BackColor="#D4DFE1" />  
                <SortedDescendingHeaderStyle BackColor="#15524A" />  
            </asp:GridView>  
            <br />  
        </div>  
        <h4 style="color: White">  
             DataTable second  Records after  Merging  
        </h4>  
        <asp:GridView ID="GridView3" runat="server" CellPadding="4" ForeColor="#333333" GridLines="None">  
            <AlternatingRowStyle BackColor="White" />  
            <EditRowStyle BackColor="#7C6F57" />  
            <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />  
            <HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />  
            <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />  
            <RowStyle BackColor="#E3EAEB" />  
            <SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />  
            <SortedAscendingCellStyle BackColor="#F8FAFA" />  
            <SortedAscendingHeaderStyle BackColor="#246B61" />  
            <SortedDescendingCellStyle BackColor="#D4DFE1" />  
            <SortedDescendingHeaderStyle BackColor="#15524A" />  
        </asp:GridView>  
        <br />  
        </form>  
    </body>  
    </html>

Step 2

Create the records for the table (you can also bind to records from the database).

Scenario

We have a different vendor from which we hire employees and they provide the employee records to our software development team using a web service and our job is to merge all the vendor records into one single data table so we can insert them into our database.
Open the Default.aspx.cs page and create a Vendor table (consider they are provided) as in the following:
DataTable dt = new DataTable();  
           DataRow dr = null;  
           dt.Columns.Add("Id", typeof(int));  
           dt.Columns[0].AutoIncrementSeed = 1;  
           dt.Columns[0].AutoIncrement = true;  
           dt.Columns.Add("Name");  
           dt.Columns.Add("Employer");  
           dr = dt.NewRow();  
           dr["Name"] = "Alexia Pamelov";  
           dr["Employer"] = "LT";  
           dt.Rows.Add(dr);  
  
           DataRow dr2 = null;  
           dr2 = dt.NewRow();  
           dr2["Name"] = "friedrich Eisenhauer";  
           dr2["Employer"] = "Microsoft";  
           dt.Rows.Add(dr2);

Now create the second vendor table (consider they are provided) as in the following:

DataTable dt2 = new DataTable();  
           DataRow dr1 = null;  
          
           dt2.Columns.Add("Id", typeof(int));  
           dt2.Columns[0].AutoIncrementSeed = 1;  
           dt2.Columns[0].AutoIncrement = true;  
           dt2.Columns.Add("Name");  
           dt2.Columns.Add("Employer");  
           dr1 = dt2.NewRow();  
           dr1["Name"] = "Anjali Punjab";  
           dr1["Employer"] = "Goverment";  
           dt2.Rows.Add(dr1);

Now we have a two tables from two different vendors, now we want to merge these two table’s records into one table, then just use the merge method of DataTable and pass the table as in the following:

  //merging first data table into second data table  
             dt2.Merge(dt);  
             dt2.AcceptChanges();
Now from the preceding example it’s clear that we can merge two tables into a single table. Now let us learn about some of the merge rules of DataTables.
  •  If the number of columns do not match the second table

When the number of columns do not match the second table then it creates blank columns for the table for the column(s) that do not match, as in the following

In the preceding you saw that the first data table only has two columns, Id and Employer, and the second table has the three columns Id, Employer and Name so the first table is created with a blank column.
  •  If the data type of a column does not match the second table

The data types must match. If the column names are the same and if the column name in both tables are the same and the data type is different then it shows the following error.

eror

From preceding image it’s clear that it must match the data type of both the columns.
  • If the column name does not match any in the second table

If a column name does not match in the second table then it creates records with a blank in each column that does not match and keeps their own orignal column names as follows.

So let us bind three Grid Views from three tables so we can understand the difference. Now the entire code of Defualt.aspx.cs will look as follows:

using System;  
using System.Collections.Generic;  
using System.Linq;  
using System.Web;  
using System.Web.UI;  
using System.Web.UI.WebControls;  
using System.Data;  
  
namespace MergeMultipleDataTable  
{  
    public partial class Defafult : System.Web.UI.Page  
    {  
        protected void Page_Load(object sender, EventArgs e)  
        {  
            DataTable dt = new DataTable();  
            DataRow dr = null;  
            dt.Columns.Add("Id", typeof(int));  
            dt.Columns[0].AutoIncrementSeed = 1;  
            dt.Columns[0].AutoIncrement = true;  
            dt.Columns.Add("Name");  
            dt.Columns.Add("Employer");  
            dr = dt.NewRow();  
            dr["Name"] = "Alexia Pamelov";  
            dr["Employer"] = "LT";  
            dt.Rows.Add(dr);  
  
            DataRow dr2 = null;  
            dr2 = dt.NewRow();  
            dr2["Name"] = "friedrich Eisenhauer";  
            dr2["Employer"] = "Microsoft";  
            dt.Rows.Add(dr2);  
  
            GridView1.DataSource = dt;  
            GridView1.DataBind();  
            DataTable dt2 = new DataTable();  
            DataRow dr1 = null;  
           
            dt2.Columns.Add("Id", typeof(int));  
            dt2.Columns[0].AutoIncrementSeed = 1;  
            dt2.Columns[0].AutoIncrement = true;  
            dt2.Columns.Add("Name");  
            dt2.Columns.Add("Employer");  
            dr1 = dt2.NewRow();  
            dr1["Name"] = "Anjali Punjab";  
            dr1["Employer"] = "Goverment";  
            dt2.Rows.Add(dr1);  
            GridView2.DataSource = dt2;  
            GridView2.DataBind();  
  
            //merging first data table into second data table  
           dt2.Merge(dt);  
           dt2.AcceptChanges();  
           GridView3.DataSource = dt2;  
           GridView3.DataBind();  
  
        }  
    }  
}
From the preceding example it’s clear that we can merge two tables into a single table.

Notes

  • Download the Zip file from the attachment for the full source code of the application.
  • You can also bind the tables from the database.
  • The data type of a column must be match if the column names are the same.

Summary

I hope this article is useful for all readers, if you have any suggestion then please contact me including beginners also.