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 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 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 :: Create Console Application ASP.NET 5 Using Visual Studio 2015

We know Visual Studio 2015 Preview has been released, it has been announced by Microsoft on November 12, 2014 at the Visual Studio Connect() event in New York, USA. With this new release of Visual Studio 2015 many new features have been added but this article is only about the two new ways to create projects with ASP.NET 5 under the Web node that is in Visual Studio 2015 Preview.

ASP.NET 5 came with Visual Studio 2015 Preview. Now we have a new way to create a Console Application project under Visual C# \Web Template. The following are the two new templates for ASP.NET 5 but this article only explains:

Comparison of ASP.NET 5 and ASP.NET 4.5 Project Templates

22

Now use the following procedure to create a Console Application using the ASP.NET 5  project template in Visual Studio 2015 Preview.

Step I

To create a new Console Application using the ASP.NET 5 Console Application project template use the following procedure:

“File” -> “New” -> “Project…”

Now in the New Project window the following project template will be shown in which we will select the language Visual C# and select Web from the child menu of Visual C#. It will look like as in the following figure.

33

In the preceding project template we can see that now we have the three types of projects, in other words:

  • ASP.NET Web Application
  • ASP.NET 5 Console Application
  • ASP.NET 5 Class Library

But this article only explains ASP.NET 5 Console Application. So select ASP.NET 5 Console Application and continue to create this project.

Step II

Now we can see a quite different look of Solution Explorer in comparison to other older version. Let’s see the following figure that represents the new architecture of projects.

44

In the preceding picture we are watching various new files that were not available with the older version Console Application. Let’s see the following short explanation that describes the new files and their roles.

project.json

This file (project.json) is synchronized with Solution Explorer, it contains the information about dependencies (assemblies references that are being used by this application).

Note: when we remove any dependency from the project then this file will be updated automatically. It behaves very similar to web.config in web applications.

This file contains the following default code that contains the information of version, dependencies, framework and the two new assembly references.

{  
    "version": "1.0.0-*",  
    "dependencies": {  
    },  
    "commands": {   
        "run" : "run"  
    },  
    "frameworks" : {  
        "aspnet50" : { },  
        "aspnetcore50" : {   
            "dependencies": {  
                "System.Console": "4.0.0-beta-22231"  
            }  
        }  
    }   
}

In the preceding code we can see that only one dependency is showing, which is:

“System.Console” :”4.0.0-beta-22231” – it is a new assembly that is added with .NET Framework 5 in Visual Studio 2015.

global.json

This file contains the information about solutions. In other words it keeps the definition about which is the solution folder for the source files of the current application. When we create a new project in an ASP.NET 5 Console Application, we have the following default line of code in the global.json file.

    {  
      "sources": [ "src", "test" ]  
    }  

Here src represents the folder that contains all the project’s files that contain the source code that make up our application.

Step III

Now we will write some program code to test the application. So for this program we will write a simple program to display the counting table. Let’s see how we write this code in the Program.cs file.

    using System;   
    using System.Console;   
    namespace AspNet5ConsoleAppExample  
    {  
        public class Program  
        {  
            public void Main(string[] args)  
            {  
                Console.WriteLine("\nThis is an example program written \nin ASP.NET 5 !");  
                  Console.WriteLine("_________________________________________\n");  
                //  
                ShowCountingTable(1, 100);  
                Console.ReadLine();  
            }  
            //A program code to print 1-100  
            private void ShowCountingTable(int startPont, int endPoint)  
            {  
                int i = startPont;    
                int symbolCount = 0;  
                while (startPont <= endPoint)  
                {  
                    if (symbolCount <= 10)  
                    {  
                        symbolCount++;  
                        Write(startPont + "\t");  
                        if (symbolCount == 10)  
                        {  
                            symbolCount = 0;  
                            WriteLine("");  
                        }  
                        startPont++; 
                    }  
                }  
            }  
        }   
    }  

Step IV

Now execute the application to see the output. After successful execution we will see the following output.

Output Window

55