ASP.NET 4.5 and ASP.NET Core 1 Hosting BLOG

Tutorial and Articles about ASP.NET 4.0 and the latest ASP.NET 4.5 Hosting

ASPHostPortal.com Announces Joomla 3.6.2 Hosting Solution

clock September 20, 2016 20:31 by author Dan

Today, ASPHostPortal.com provides reliable Joomla 3.6.2 hosting plans on high performance servers and high-speed internet connection in the world. We are using SSD's for storage, which provides much higher performance in terms of I/O and data transfer speed. We strongly believe in high quality standards and Hence, you’ll always find our services better than every other host in this industry. Therefore, our focus is always aimed at making sure customers are constantly able to achieve optimal performance and usability with all of the services that we offer.

Joomla is a very competitive tool when websites related to eCommerce, online newspapers and so on, need to be developed. Object oriented programming techniques are employed by Joomla so relevant code can be programmed. This is what makes Joomla a preferable choice as a content management system that a broad spectrum of companies seem to be in need of these days. Even developers prefer Joomla because it can be deployed in a relatively small time frame.

With Joomla, developers do not have to copy pages, or migrate a website to its new look, which is quite complicated. Joomla has a tremendous community of developers. Joomla is currently one of the most widely used content management systems and this is the reason Joomla website development is used so widely. Some days ago, Joomla has been released their new Joomla 3.6.2 version with the new features and fixing some bugs from earlier versions.

ASPHostPortal.com has served people since 2008 and we know how to deliver Powerful, Fast and Reliable Joomla 3.6.2 Hosting for all customers. We offer Joomla 3.6.2 hosting with affordable price, a lot of features, 99.99% uptime guarantee, 24/7 support, and 30 days money back guarantee. We strive to make sure that all customers have the finest web-hosting experience as possible. To learn more about our Joomla 3.6.2 Hosting, please visit http://asphostportal.com/Joomla-3-6-2-Hosting

About ASPHostPortal.com:
ASPHostPortal.com is The Best, Cheap and Recommended ASP.NET & Linux Hosting. ASPHostPortal.com has ability to support the latest Microsoft, ASP.NET, and Linux technology, such as: such as: WebMatrix, Web Deploy, Visual Studio, Latest ASP.NET Version, Latest ASP.NET MVC Version, Silverlight and Visual Studio Light Switch, Latest MySql version, Latest PHPMyAdmin, Support PHP, etc. Their service includes shared hosting, reseller hosting, and Sharepoint hosting, with speciality in ASP.NET, SQL Server, and Linux solutions. Protection, trustworthiness, and performance are at the core of hosting operations to make certain every website and software hosted is so secured and performs at the best possible level.



ASP.NET Hosting - ASPHostPortal.com :: How to Add Controls to an ASP.NET Web Page Programmatically

clock September 20, 2016 19:39 by author Armend

How to Add Controls to an ASP.NET Web Page Programmatically

In order to programmatically add a control to a page, there must be a container for the new control. For example, if you are creating table rows, the container is the table. If there is no obvious control to act as container, you can use a PlaceHolder or Panel Web server control.

In some instances, you might want to create both static text and controls. To create static text, you can use either a Literal or a Label Web server control. You can then add these controls to the container as you would any other control. For information about view state in controls created at run time, see Dynamic Web Server Controls and View State.

To add a control to an ASP.NET Web page programmatically

  • Create an instance of the control and set its properties, as shown in the following example:

Label myLabel = new Label();
myLabel.Text = "Sample Label";

  • Add the new control to the Controls collection of a container already on the page, as shown in the following example:

Panel Panel1= new Panel();
Panel1.Controls.Add(myLabel);

Note

Because the Controls property is a collection, you can use the AddAt method to place the new control at a specific location — for example, in front of other controls. However, this can introduce errors into the page. For details, see Dynamic Web Server Controls and View State.

The following code example shows the event handler for the SelectedIndexChanged event of a control named DropDownList1. The handler creates as many label controls as the user has selected from the drop-down list. The container for the controls is a PlaceHolder Web server control named Placeholder1.

Security Note

User input in a Web page can include potentially malicious client script. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, Script Exploits Overview.

private void DropDownList1_SelectedIndexChanged(object sender, System.EventArgs e)
{
    DropDownList DropDownList1 = new DropDownList();
    PlaceHolder PlaceHolder1 = new PlaceHolder();

  // Get the number of labels to create.
 int numlabels = System.Convert.ToInt32(DropDownList1.SelectedItem.Text);
 for (int i=1; i<=numlabels; i++)
 {
   Label myLabel = new Label();

   // Set the label's Text and ID properties.
   myLabel.Text = "Label" + i.ToString();
   myLabel.ID = "Label" + i.ToString();
   PlaceHolder1.Controls.Add(myLabel);
   // Add a spacer in the form of an HTML <br /> element.
   PlaceHolder1.Controls.Add(new LiteralControl("<br />"));
 }
}

Best ASP.NET Hosting Recommendation

ASPHostPortal.com provides its customers with Plesk Panel, one of the most popular and stable control panels for Windows hosting, as free. You could also see the latest .NET framework, a crazy amount of functionality as well as Large disk space, bandwidth, MSSQL databases and more. All those give people the convenience to build up a powerful site in Windows server. ASPHostPortal.com offers ASP.NET hosting starts from $1/month only. They also guarantees 30 days money back and guarantee 99.9% uptime. If you need a reliable affordable ASP.NET Hosting, ASPHostPortal.com should be your best choice.

 



ASP.NET Hosting - ASPHostPortal.com :: How to prevent Button Click in ASP.NET ( Until Insert Query Done)

clock September 19, 2016 21:22 by author Dan

In this post you will see how to do some simple prevention on Asp.net page button click until long time inserting query done.

If you work a lot with SQL Store procedure, or other ways of T-SQL communication between your Asp.net page and database, it's so possible that you have to do some prevention when user try to insert or update some long data to SQL .

With this line of code when user make first click button become a disabled until inserting,updating done!.

protected void Page_Load(object sender, EventArgs e)
{
        Button1.Attributes.Add("onclick", " this.disabled = true; " + ClientScript.GetPostBackEventReference(Button1, null) + ";");   // C#
}

Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
Button.Attributes.Add("onclick", " this.disabled = true; " &
ClientScript.GetPostBackEventReference(Button1, Nothing) & ";") // VB.NET
End Sub

Best ASP.NET Hosting Recommendation

ASPHostPortal.com provides its customers with Plesk Panel, one of the most popular and stable control panels for Windows hosting, as free. You could also see the latest .NET framework, a crazy amount of functionality as well as Large disk space, bandwidth, MSSQL databases and more. All those give people the convenience to build up a powerful site in Windows server. ASPHostPortal.com offers ASP.NET hosting starts from $1/month only. They also guarantees 30 days money back and guarantee 99.9% uptime. If you need a reliable affordable ASP.NET Hosting, ASPHostPortal.com should be your best choice.



ASP.NET Hosting - ASPHostPortal.com :: Easy Steps to uncompress CSS or Indent CSS Tag in ASP.NET

clock September 16, 2016 23:05 by author Dan

To uncompress CSS or to restore line break and tab or format css back to state before it was compress, then use this utility.

1) Create one empty web application.

2) On Default.aspx add following lines of code. Following line of code will create one text box to input css, button to Indent CSS tag

<h2>
Welcome to My CSS Indenting Application
</h2>
<p>
<asp:TextBox ID="txtCSSInput" runat="server" TextMode="MultiLine" Rows="10" Columns="50"></asp:TextBox>
</p>
<p>
<asp:Button ID="btnIndentCSS" runat="server" Text="Click to Indent CSS"
onclick="btnIndentCSS_Click" />
</p>
<p>
<asp:Label ID="lblDisplayCSS" runat="server" Text=""></asp:Label>
</p>


3) Add following line of code in Code behind (Default.aspx.cs)

protected void btnIndentCSS_Click(object sender, EventArgs e)
{
lblDisplayCSS.Text = txtCSSInput.Text
.Replace(".", "<br/>.")
.Replace("}#", "}<br/>#")
.Replace(";", ";<br/>")
.Replace("{", "{<br/>")
.Replace("}", "}<br/><br/>");
}


That's it and you are done!


Best ASP.NET Hosting Recommendation

ASPHostPortal.com provides its customers with Plesk Panel, one of the most popular and stable control panels for Windows hosting, as free. You could also see the latest .NET framework, a crazy amount of functionality as well as Large disk space, bandwidth, MSSQL databases and more. All those give people the convenience to build up a powerful site in Windows server. ASPHostPortal.com offers ASP.NET hosting starts from $1/month only. They also guarantees 30 days money back and guarantee 99.9% uptime. If you need a reliable affordable ASP.NET Hosting, ASPHostPortal.com should be your best choice.



ASPHostPortal.com Announces nopCommerce 3.80 Hosting Solution

clock September 13, 2016 21:22 by author Dan

Today, ASPHostPortal.com offers reliable nopCommerce 3.80 hosting solutions with fast loading speed, and uptime guarantee. We care for the clients, ensuring each and every client is more than just satisfied day in and day out. We have provided exceptional plans, at the lowest prices, for the best services possible, on fastest nodes ever. Our servers are connected to the network using multiple 1Gbps ports (bond network). So, customers don't have to worry about the speed of their website.

nopCommerce is the best open-source e-commerce shopping cart. nopCommerce is available for free. Today it's the best and most popular ASP.NET ecommerce software. It has been downloaded more than 1.5 million times! nopCommerce is a fully customizable shopping cart. It's stable and highly usable. nopCommerce is an open source ecommerce solution that is ASP.NET (MVC) based with a MS SQL 2008 (or higher) backend database. Some days ago, nopCommerce released their new nopCommerce 3.80 version.

ASPHostPortal.com provides full trust web hosting services for customer's nopCommerce 3.80 site. nopCommerce 3.80 is an open source ecommerce software that contains both a catalog front-end and an administration tool backend. nopCommerce 3.80 is a fully customizable shopping cart. It’s stable and highly usable. From downloads to documentation, nopCommerce.com offers a comprehensive base of information, resources, and support to the nopCommerce community.

Established in 2008, ASPHostPortal.com is one of the leading nopCommerce 3.80 hosting provider offering quality services with premium support. We support this new technology with affordable price, a lot of features, 99.99% uptime guarantee, 24/7 support, and 30 days money back guarantee. We strive to make sure that all customers have the finest web-hosting experience as possible. To learn more about our nopCommerce 3.80 Hosting, please visit http://asphostportal.com/nopCommerce-3-80-Hosting

About ASPHostPortal.com:
ASPHostPortal.com is The Best, Cheap and Recommended ASP.NET & Linux Hosting. ASPHostPortal.com has ability to support the latest Microsoft, ASP.NET, and Linux technology, such as: such as: WebMatrix, Web Deploy, Visual Studio, Latest ASP.NET Version, Latest ASP.NET MVC Version, Silverlight and Visual Studio Light Switch, Latest MySql version, Latest PHPMyAdmin, Support PHP, etc. Their service includes shared hosting, reseller hosting, and Sharepoint hosting, with speciality in ASP.NET, SQL Server, and Linux solutions. Protection, trustworthiness, and performance are at the core of hosting operations to make certain every website and software hosted is so secured and performs at the best possible level.



ASPHostPortal.com Announces Drupal 8.1.8 Hosting Solution

clock September 6, 2016 20:12 by author Dan

ASPHostPortal.com provides affordable and high performance Drupal 8.1.8 hosting to customers around the world. Our company is passionate about hosting and strive to deliver an excellent level of service to each customer. We strongly believe in high quality standards and Hence customers will always find our services better than every other host in this industry. Today, we announce the availability of Drupal 8.1.8 hosting with reliable service.

Drupal 8.1.8 is a content management system offering shorter time to market, empowerment of end users to do customizations that traditionally requires software engineering, sustainability and lower total cost of ownership. It’s built, used, and supported by an active and diverse community of people around the world.

Use Drupal to build everything from personal blogs to enterprise applications. Thousands of add-on modules and designs let people build any site they can imagine. Drupal is open source software maintained and developed by a community of over 1,000,000 users and developers.

ASPHostPortal.com offers Drupal 8.1.8 Hosting with expert team support. We support this new technology with affordable price, a lot of features, 99.99% uptime guarantee, 24/7 support, and 30 days money back guarantee. We strive to make sure that all customers have the finest web-hosting experience as possible. To learn more about our Drupal 8.1.8 Hosting, please visit http://asphostportal.com/Drupal-8-1-8-Hosting

About ASPHostPortal.com
:
ASPHostPortal.com is The Best, Cheap and Recommended ASP.NET & Linux Hosting. ASPHostPortal.com has ability to support the latest Microsoft, ASP.NET, and Linux technology, such as: such as: WebMatrix, Web Deploy, Visual Studio, Latest ASP.NET Version, Latest ASP.NET MVC Version, Silverlight and Visual Studio Light Switch, Latest MySql version, Latest PHPMyAdmin, Support PHP, etc. Their service includes shared hosting, reseller hosting, and Sharepoint hosting, with speciality in ASP.NET, SQL Server, and Linux solutions. Protection, trustworthiness, and performance are at the core of hosting operations to make certain every website and software hosted is so secured and performs at the best possible level.



ASP.NET Hosting - ASPHostPortal.com :: Tips to Create Create WebGrid with Expand in ASP.NET MVC

clock September 6, 2016 19:53 by author Armend

Introduction

In this post, I am explain How to Create Nested WebGrid with Expand/Collapse in ASP.NET MVC 6.
Steps :

Step - 1 : Create New Project.

  • Go to File > New > Project > Select asp.net MVC6 web application > Entry Application Name > Click OK > Select Internet Application > Select view engine Razor > OK

Step-2: Add a Database.

  • Go to Solution Explorer > Right Click on App_Data folder > Add > New item > Select SQL Server Database Under Data > Enter Database name > Add.

Step-3: Create table for fetch data.

  • Open Database > Right Click on Table > Add New Table > Add Columns > Save > Enter table name > OK.

In this example, I have used two tables as below

Step-4: Add Entity Data Model.

  • Go to Solution Explorer > Right Click on Project name form Solution Explorer > Add > New item > Select ADO.net Entity Data Model under data > Enter model name > Add.
  • A popup window will come (Entity Data Model Wizard) > Select Generate from database > Next >
  • Chose your data connection > select your database > next > Select tables > enter Model Namespace > Finish.

Step-5: Add a class for create a view model.

  • 1st : Add a folder.
  • Go to Solution Explorer > Right Click on the project > add > new folder.
  • 2nd : Add a class on that folder
  • Go to Solution Explorer > Right Click on that folder > Add > Class... > Enter Class name > Add.

Write the following code in this class

using System.Collections.Generic;
namespace MVCNestedWebgrid.ViewModel
{
    public class OrderVM
    {
        public OrderMaster order { get; set; }
        public List<OrderDetail> orderDetails { get; set; }
    }
}

Step-6: Add a new Controller.

  • Go to Solution Explorer > Right Click on Controllers folder form Solution Explorer > Add > Controller > Enter Controller name > Select Templete "empty MVC Controller"> Add.

Step-7: Add new action into your controller for show nested data in a webgrid.

Here I have added "List" Action into "Order" Controller. Please write this following code

public ActionResult List()
{
    List<OrderVM> allOrder = new List<OrderVM>();
 
    // here MyDatabaseEntities is our data context
    using (MyDatabaseEntities dc = new MyDatabaseEntities())
    {
        var o = dc.OrderMasters.OrderByDescending(a => a.OrderID);
        foreach (var i in o)
        {
            var od = dc.OrderDetails.Where(a => a.OrderID.Equals(i.OrderID)).ToList();
            allOrder.Add(new OrderVM { order= i, orderDetails = od });
        }
    }
    return View(allOrder);
}

Step-8: Add view for the Action & design.

  • Right Click on Action Method (here right click on form action) > Add View... > Enter View Name > Select View Engine (Razor) > Check "Create a strong-typed view" > Select your model class > Add.

NOTE " Please Rebuild solution before add view

Html Code
@model IEnumerable<MVCNestedWebgrid.ViewModel.OrderVM>

@{
    ViewBag.Title = "Order List";
    WebGrid grid = new WebGrid(source: Model, canSort: false);
}
<div id="main" style="padding:25px; background-color:white;">
    @grid.GetHtml(
    htmlAttributes: new {id="gridT", width="700px" },
    columns:grid.Columns(
            grid.Column("order.OrderID","Order ID"),
            grid.Column(header:"Order Date",format:(item)=> string.Format("{0:dd-MM-yyyy}",item.order.OrderDate)),
            grid.Column("order.CustomerName","Customer Name"),
            grid.Column("order.CustomerAddress","Address"),
            grid.Column(format:(item)=>{
                WebGrid subGrid = new WebGrid(source: item.orderDetails);
                return subGrid.GetHtml(
                    htmlAttributes: new { id="subT" },
                    columns:subGrid.Columns(
                            subGrid.Column("Product","Product"),
                            subGrid.Column("Quantity", "Quantity"),
                            subGrid.Column("Rate", "Rate"),
                            subGrid.Column("Amount", "Amount")
                        )                   
                    );
            })
        )
    )
</div>
Css Code
<style>
th, td {
        padding:5px;
    }
    th
    {
        background-color:rgb(248, 248, 248);       
    }
    #gridT,  #gridT tr {
        border:1px solid #0D857B;
    }
    #subT,#subT tr {
        border:1px solid #f3f3f3;
    }
    #subT {
        margin:0px 0px 0px 10px;
        padding:5px;
        width:95%;
    }
    #subT th {
        font-size:12px;
    }
    .hoverEff {
        cursor:pointer;
    }
    .hoverEff:hover {
        background-color:rgb(248, 242, 242);
    }
    .expand {
        background-image: url(/Images/pm.png);
        background-position-x: -22px;
        background-repeat:no-repeat;
    }
    .collapse  {
        background-image: url(/Images/pm.png);
        background-position-x: -2px;
        background-repeat:no-repeat;
    }
</style>
Write the following Jquery code for make webgrid collapsible
<script>
    $(document).ready(function () {
        var size = $("#main #gridT > thead > tr >th").size(); // get total column
        $("#main #gridT > thead > tr >th").last().remove(); // remove last column
        $("#main #gridT > thead > tr").prepend("<th></th>"); // add one column at first for collapsible column
        $("#main #gridT > tbody > tr").each(function (i, el) {
            $(this).prepend(
                    $("<td></td>")
                    .addClass("expand")
                    .addClass("hoverEff")
                    .attr('title',"click for show/hide")
                );
            //Now get sub table from last column and add this to the next new added row
            var table = $("table", this).parent().html();
            //add new row with this subtable
            $(this).after("<tr><td></td><td style='padding:5px; margin:0px;' colspan='" + (size - 1) + "'>" + table + "</td></tr>");
            $("table", this).parent().remove();
            // ADD CLICK EVENT FOR MAKE COLLAPSIBLE
            $(".hoverEff", this).live("click", function () {
                $(this).parent().closest("tr").next().slideToggle(100);
                $(this).toggleClass("expand collapse");
            });
        });
        //by default make all subgrid in collapse mode
        $("#main #gridT > tbody > tr td.expand").each(function (i, el) {
            $(this).toggleClass("expand collapse");
            $(this).parent().closest("tr").next().slideToggle(100);
        });    
    });
</script>

 

Best ASP.NET MVC 6 Hosting Recommendation

ASPHostPortal.com provides its customers with Plesk Panel, one of the most popular and stable control panels for Windows hosting, as free. You could also see the latest .NET framework, a crazy amount of functionality as well as Large disk space, bandwidth, MSSQL databases and more. All those give people the convenience to build up a powerful site in Windows server. ASPHostPortal.com offers ASP.NET hosting starts from $1/month only. They also guarantees 30 days money back and guarantee 99.9% uptime. If you need a reliable affordable ASP.NET Hosting, ASPHostPortal.com should be your best choice.



ASP.NE Core 1.0 Hosting - ASPHostPortal.com :: How to Get Users IP Address in ASP.NET

clock September 5, 2016 23:20 by author Dan

Here we will learn how to get users / client IP address in asp.net using c# and vb.net with example or retrieving user's IP address in asp.net using c# and vb.net or how to get IP address of visitors machine in asp.net using c# and vb.net with example.

Description:

In previous articles I explained JavaScript Get User IP Address, City, Latitude, Longitude, how to find client machine IP using jquery in asp.net, show users current location in google map using latitude and longitude in asp.net, show google map with latitude & longitude in asp.net and many articles relating to asp.net, c#, vb.net jQuery. Now I will explain how to get users ip address or client IP address of machine in asp.net using c# and vb.net.

To get user / client ip address of machine in asp.net first create new application in visual studio then open aspx page and write the code as shown following.

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Get visitors machine IP in asp.net</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label ID="lblIP" runat="server" Font-Bold="true" Font-Size="XX-Large" ForeColor="#529E00"/>
</div>
</form>
</body>
</html>


Now open code behind file and write the code like as shown below

C# Code

protected void Page_Load(object sender, EventArgs e)
{
string IPAdd = string.Empty;
IPAdd = Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
if (string.IsNullOrEmpty(IPAdd))
IPAdd = Request.ServerVariables["REMOTE_ADDR"];
lblIP.Text = IPAdd;
}

VB.NET Code

Partial Class Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
Dim IPAdd As String = String.Empty
IPAdd = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If String.IsNullOrEmpty(IPAdd) Then
IPAdd = Request.ServerVariables("REMOTE_ADDR")
End If
lblIP.Text = IPAdd
End Sub
End Class


If you observe above code when users ip address behind the proxies or routers then REMOTE_ADDR will return IP Address of router, not the user’s machine IP because of that first we need to check with HTTP_X_FORWARDED_FOR. In case if users machine IP address behind a proxy server then his machine’s IP Address will appended to Proxy Server’s IP Address.

Best ASP.NET Hosting Recommendation

ASPHostPortal.com provides its customers with Plesk Panel, one of the most popular and stable control panels for Windows hosting, as free. You could also see the latest .NET framework, a crazy amount of functionality as well as Large disk space, bandwidth, MSSQL databases and more. All those give people the convenience to build up a powerful site in Windows server. ASPHostPortal.com offers ASP.NET hosting starts from $1/month only. They also guarantees 30 days money back and guarantee 99.9% uptime. If you need a reliable affordable ASP.NET Hosting, ASPHostPortal.com should be your best choice.



ASP.NET Core 1.0 Hosting - ASPHostPortal.com :: How to Create Connection Polling in ASP.NET

clock September 2, 2016 23:23 by author Dan

I will explain what is connection pooling in asp.net using c#, vb.net with example or how to use connection pooling in ado.net with example or asp.net understand connection pooling with example in c#, vb.net with example. Connection pooling in asp.net is the place where it maintains set of active connections to database based on configuration and it reduce the cost of opening and closing connection to database.

What is Connection Pooling in Asp.NET?

Generally connecting to database server is a time consuming process because whenever we request to connect database first it will establish network handshaking with server and then connection string will be parsed and it will check whether given connection credentials correct or not to connect server and so on.

In our applications mostly we use one or two connection configurations and repeatedly same connection configuration will be opened and closed, automatically huge time will be consumed to open and close same database connection.

To reduce the cost of opening and closing the same connection repeatedly, ADO.NET uses an optimization technique called connection pooling.

Connection pooling is the place where it will maintain all the active database connections in one place to reduce the cost of opening and closing database connections. Whenever user send new request to Open a database connection the pooler will looks for an available connection in the pool in case if a pooled connection available then it will return pooled connection instead of opening new connection otherwise the new connection pool is created with the connection string in the connection for next time reuse.

Once we finished operations on database we need to Close the connection then that connection will be returned to the pool and its ready to be reused on the next Open call.

Create Connection Pooling in Asp.Net

To enable this connection pooling in asp.net we don’t need to do anything by default connection pooling is enabled in ADO.NET. Unless we manually disable the connection pooling, the pooler will optimize the connections when they are opened and closed in our application.

First time if we are opening a new connection, a distinct new connection pool is created based on the matching connection string in the connection. While creating connection pool it will check is there any connection pool created with that connection string or not by using keywords supplied in connection. In case if we send connection strings keywords in different order then it will treat it as separate connection string and same connection will be pooled separately.

C# Code

using (SqlConnection con = new SqlConnection("Data Source=Suresh;Integrated security=SSPI;Initial Catalog=SampleDB"))
{
con.Open();
// Connection Pool A will be created.
}
using (SqlConnection con = new SqlConnection("Data Source=Suresh;Integrated security=SSPI;Initial Catalog=aspdotnetDB"))
{
con.Open();
// Separate connection pool B will create because connection string different.
}
using (SqlConnection con = new SqlConnection("Data Source=Suresh;Initial Catalog=aspdotnetdb;Pooling=false;"))
{
con.Open();
// No connection pool will create because we defined Pooling = false.
}
using (SqlConnection con = new SqlConnection("Data Source=Suresh;Integrated security=SSPI;Initial Catalog=SampleDB"))
{
con.Open();
// This connection string matches with Connection Pool A.
}

VB.NET Code

Using con As New SqlConnection("Data Source=Suresh;Integrated security=SSPI;Initial Catalog=SampleDB")
' Connection Pool A will be created.
con.Open()
End Using
Using con As New SqlConnection("Data Source=Suresh;Integrated security=SSPI;Initial Catalog=aspdotnetDB")
' Separate connection pool B will create because connection string different.
con.Open()
End Using
Using con As New SqlConnection("Data Source=Suresh;Initial Catalog=aspdotnetdb;Pooling=false;")
' No connection pool will create because we defined Pooling = false.
con.Open()
End Using
Using con As New SqlConnection("Data Source=Suresh;Integrated security=SSPI;Initial Catalog=SampleDB")
' This connection string matches with Connection Pool A.
con.Open()
End Using


The connections pooler will remove connections from the pool after it has been idle for approximately 4-8 minutes.

Following are the connection pooler properties which we can add to connection string based on our requirements.

Max Pool Size: We can define maximum number of connections can be created in the pool. By default its 100 and we can add property like Max Pool Size=100.

Min Pool Size: We can define minimum number of connections maintained in the pool. The default is 0. We can add property like Min Pool Size=0.

Pooling: It will allow us to set condition to add connection string to pool or not. By default its true. In case we don’t want to add it into pool then we need to define property like Pooling=false.

Best ASP.NET Hosting Recommendation

ASPHostPortal.com provides its customers with Plesk Panel, one of the most popular and stable control panels for Windows hosting, as free. You could also see the latest .NET framework, a crazy amount of functionality as well as Large disk space, bandwidth, MSSQL databases and more. All those give people the convenience to build up a powerful site in Windows server. ASPHostPortal.com offers ASP.NET hosting starts from $1/month only. They also guarantees 30 days money back and guarantee 99.9% uptime. If you need a reliable affordable ASP.NET Hosting, ASPHostPortal.com should be your best choice.



ASPHostPortal.com Announces WordPress 4.6 Hosting Solution

clock August 31, 2016 01:11 by author Dan

ASPHostPortal.com is a WordPress hosting company that has been in existence since 2008. This makes it one of the oldest hosting companies in the market today. This gives them plenty of experience on what is required by clients who are looking for reliable WordPress hosting services. Today, we support WordPress 4.6 hosting to all their customers.

WordPress is user-friendly. It is easy both to learn and use. Finally, people don't has to be an expert to update their website or blog. This is why so many businesses utilize WordPress to share their news and information online.

Beside that, WordPress also has the capability to install plug-ins. Plug-ins allow business owners to add all sorts of things to their website and blog, such as pictures, maps, applications and much more. These are all easy to install with WordPress. There is no need to spend money on a web programmer when you can utilize WordPress's low-cost tools.

ASPHostPortal provides reliable and secure WordPress 4.6 hosting solutions. Our data center includes power generator, daily backups and 24/7 network monitoring. ASPHostPortal staff is able to manage any problems may occur. The technicians are knowledgeable as well as skilled. Our Wordpress 4.6 hosting plan provides even more value to clients by providing 24/7/365 customer support , a reliable hosting infrastructure and a 30 Day Money Back Guarantee. To learn more about our WordPress 4.6 Hosting, please visit http://asphostportal.com/WordPress-4-6-Hosting

About ASPHostPortal.com:

ASPHostPortal.com is The Best, Cheap and Recommended ASP.NET & Linux Hosting. ASPHostPortal.com has ability to support the latest Microsoft, ASP.NET, and Linux technology, such as: such as: WebMatrix, Web Deploy, Visual Studio, Latest ASP.NET Version, Latest ASP.NET MVC Version, Silverlight and Visual Studio Light Switch, Latest MySql version, Latest PHPMyAdmin, Support PHP, etc. Their service includes shared hosting, reseller hosting, and Sharepoint hosting, with speciality in ASP.NET, SQL Server, and Linux solutions. Protection, trustworthiness, and performance are at the core of hosting operations to make certain every website and software hosted is so secured and performs at the best possible level.



Cheap ASP.NET 4.5 Hosting

We’re a company that works differently to most. Value is what we output and help our customers achieve, not how much money we put in the bank. It’s not because we are altruistic. It’s based on an even simpler principle. "Do good things, and good things will come to you".

Success for us is something that is continually experienced, not something that is reached. For us it is all about the experience – more than the journey. Life is a continual experience. We see the Internet as being an incredible amplifier to the experience of life for all of us. It can help humanity come together to explode in knowledge exploration and discussion. It is continual enlightenment of new ideas, experiences, and passions


Author Link


 

Corporate Address (Location)

ASPHostPortal
170 W 56th Street, Suite 121
New York, NY 10019
United States

Tag cloud

Sign in