All About ASP.NET and ASP.NET Core 2 Hosting BLOG

Tutorial and Articles about ASP.NET and the latest ASP.NET Core

ASP.NET Core Hosting :: 5 Reasons to Use ASP.NET Core

clock January 9, 2019 08:33 by author Jervis

When it comes to web application development, there are multiple technologies available to choose from. There are open-source technologies like Java & PHP, and then, there is closed-source technology ASP.NET MVC.

While millions of web developers use ASP.NET MVC to build web applications, but the latest ASP.NET Core framework offers far more benefits than the ASP.NET MVC for web application development.

ASP.NET Core is an open-source, cross-platform framework developed by both the Microsoft and its community. Basically, it is a complete reform of ASP.NET that combines MVC structure and Web API into a single framework.

Why Use ASP.NET Core for Web Application Development?

ASP.NET Core is an emerging, robust, and feature-rich framework that provides features to develop super-fast APIs for web apps.

Let’s take a look at the elements that make ASP.NET Core a right choice for Enterprise app development

1 — The MVC Architecture

Back in the days of the classic ASP.NET, developers had to worry about IsPostBack & ViewState. But with MVC, web application development has become more natural and the workflow also more efficient. In addition, the latest ASP.NET Core framework further helps in developing web APIs & web applications testable in better way, by achieving a clear separation of concerns.

In simple terms, ASP.NET Core makes it easier for developers to code, compile, and test something in either model, view, or the controller.

2 — Razor Pages

Razor Pages is a new element of ASP.NET Core that makes programming page-focused scenarios more productive. In technical terms, Razor Pages is a page-based coding model that makes building web UI easier.

If you’ve ever worked on ASP.NET MVC framework before, then you already know that the controller classes are filled with a large amount of actions. And not only that, but they also grow as the new things are added.

With Razor Pages, each web page becomes self-contained with its View component, and the code is also organized well together.

3 — Provides Support for Popular JavaScript Frameworks

Unlike ASP.NET MVC, the new .NET Core framework provides build-in templates for two most popular JavaScript frameworks — Angular & React (plus Aurelia).

The JavaScriptServices in the new ASP.NET Core provides an infrastructure that developers need to develop client-side apps using the above mentioned JavaScript frameworks.

The JavaScriptServices basically aims to eliminate underlying plumbing to allow developers start coding applications sooner, making it possible to build feature-rich front-end web applications.

4 — Improved Collaboration & Cross-Platform Support

ASP.NET Core is a cross-platform framework, meaning the apps build using this framework can run on Windows, Linux, and Mac Operating systems. In addition, the developers are also free to choose their development OS as well.

In simple terms, your developers can work across Linux, MacOS, or Windows and they can still collaborate on the same project. This is possible with unified experience offered by the Visual Studio IDE.

In short, the ASP.NET Core framework has the capacity to build & run web applications on Windows, Linux, and Mac OS.

5 — In-Built Dependency Injection Support

ASP.NET Core framework provides an in-built dependency injection, meaning you do not need rely on third-party frameworks like Ninject or AutoFactor anymore.

Dependency Injection is basically a pattern that can help developer distinguish the different pieces of their apps. Before the release of ASP.NET Core, the only way to get Dependency injection in any application was by using the above mentioned frameworks (Ninject, AutoFactor). But in ASP.NET Core, the dependency injection is treated as a first-class citizen. What this means is that developers are no longer limited to web applications, and they can leverage new libraries in more event-driven apps such as AWS Lambda or Azure Functions.

Overall, the dependency injection in the ASP.NET Core framework improves the testability and extensibility of web applications. 



ASP.NET Core Hosting :: Differences Between Kestrel and IIS Features

clock December 21, 2018 08:47 by author Jervis

The Kestrel web server is a new web server as part of ASP.NET Core. It is now the preferred web server for all new ASP.NET applications. In this article, we will review what it is, how to use it, and the differences between Kestrel vs IIS.

Why Do We Need the New Kestrel Web Server? What about IIS?

If you have been developing ASP.NET applications for a while, you are probably familiar with Internet Information Services (IIS). It does literally anything and everything as a web server. It is infinitely configurable with ASP.NET handlers & modules via the ASP.NET integrated pipeline. It has robust management APIs for configuration and deployment. It is even an FTP server.

The same codebase that has to support the original “.asp” pages from 15+ years ago now also handles new technologies like async ASP.NET. Like most software, as it ages it gets modified over time, they carry a lot of weight and bloat. IIS does everything, but it is not the fastest web server around. Lightweight web servers like Node.js and Netty make IIS look old and slow.

A Chance to Start Over

By creating the Kestrel web server, the .NET community was able to start over from scratch. They no longer had to worry about backward compatibility for technologies that were 15+ years old. They could take all of their past knowledge to build the simplest and fastest web server possible. That is exactly what they did. Kestrel and ASP.NET Core were built for speed.

Kestrel is more than just a new web server. ASP.NET Core & Kestrel combined are a whole new request pipeline for how ASP.NET requests work. Things like HTTP modules & handlers have been replaced with simple middleware. The entire System.Web namespace is gone. Another big advantage is designing a web server to take advantage of async from the ground up. Performance is now a feature of ASP.NET.

Built for Speed

One of the big problems with IIS and the existing ASP.NET pipeline was the performance of it. For most real world applications, the performance is perfectly fine. However, it lagged way behind in benchmarks. The combination of Kestrel & ASP.NET Core has been shown to be many times faster. It is great to see the team putting performance as a top priority.

Granted, benchmarking an ASP.NET request that says “hello world” is not comparable to most real applications that do multiple SQL queries, cache calls, and web service calls in a single request. ASP.NET makes it easy to do most I/O operations asynchronously. ASP.NET Core & Kestrel have been designed from the ground up to take advantage of async. Most real world apps should perform better if the developers follow good best practices around using async.

Cross Platform

If the goal was to get ASP.NET running on Linux, that meant porting IIS to Linux or making ASP.NET work without IIS. Kestrel solved this problem. As a developer, I can write my ASP.NET application and deploy it to Windows or Linux either one. Kestrel works as my web server on both. However, it is still recommended to use IIS, Apache, or NGINX as a reverse proxy in front of it. Next, we will discuss why that is.

Comparing Kestrel Web Server vs IIS

IIS does almost everything. Kestrel does as little as possible. Because of this, Kestrel is much faster but also lacks a lot of functionality. I would think of Kestrel as really more of an application server. It is recommended to use another web server in front of it for public web applications. Kestrel is designed to run ASP.NET as fast as possible. It relies on a full fledged web server to do deal with things like security, management, etc.

Feature Comparison for Kestrel vs IIS

Here is an IIS vs Kestrel comparison of some key features. This should help you better understand the limitations of Kestrel. You can overcome these limitations by pairing it up with IIS or NGINX.



ASP.NET Core 1.0 Hosting - ASPHostPortal.com :: Easy Steps to Create FileUpload Control With Drag Drop And Progress Bar in ASP.NET

clock July 1, 2016 19:50 by author Dan

This Example explains how to use AjaxFileUpload Control With Drag Drop And Progress Bar Functionality In Asp.Net 2.0 3.5 4.0 C# And VB.NET. May 2012 release of AjaxControlToolkit includes a new AjaxFileUpload Control which supports Multiple File Upload, Progress Bar and Drag And Drop functionality. These new features are supported by Google Chrome version 16+, Firefox 8+ , Safari 5+ and Internet explorer 10 + , IE9 or earlier does not support this feature. AjaxFileUpload Control Example with Drag Drop And Progress Bar.

To start with it, download and put latest AjaxControlToolkit.dll in Bin folder of application, Place ToolkitScriptManager and AjaxFileUpload on the page.

HTML SOURCE

<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"/>


<asp:AjaxFileUpload ID="AjaxFileUpload1" runat="server"

                    OnUploadComplete="UploadComplete"

                    ThrobberID="loader"/>


<asp:Image ID="loader" runat="server"

           ImageUrl ="~/loading.gif" Style="display:None"/>


ThrobberID is used to display loading image instead of progress bar in unsupported browsers. Type of files uploaded can be restricted by using AllowedFileTypes property with comma separated list such as "zip,doc,pdf".

Write following code in OnUploadComplete event to save the file.

C#

protected void UploadComplete(object sender, AjaxControlToolkit.AjaxFileUploadEventArgs e)
{
 string path = Server.MapPath("~/Uploads/") + e.FileName;
 AjaxFileUpload1.SaveAs(path);
}


VB.NET

protected void UploadComplete(object sender, AjaxControlToolkit.AjaxFileUploadEventArgs e)
 {
string path = Server.MapPath("~/Uploads/") + e.FileName;
 AjaxFileUpload1.SaveAs(path);
}


Build and run the code.

Best ASP.NET Core 1.0 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 integrate those fancy modal image preview in ASP.NET

clock June 27, 2016 20:51 by author Dan

Today, in this post I will quickly show you " How to integrate those fancy modal image preview in ASP.NET ".
Magic library for this functionality is mighty FancyBox the "tool that offers a nice and elegant way to add zooming functionality for images, html content and multi-media on your webpages. It is built at the top of the popular JavaScript framework jQuery and is both easy to implement and a snap to customize."

Let's see how things are working....

  1. We create web site project inside our VS 2012.
  2. Include into project jQuery in this sample I use latest version 1.7.2.
  3. Also we need to include FancyBox. (It would be very strange to not include it in this sample)

So, our project look's like:

Here you can see our included files inside project, also you can see our test page html and jQuery code.
Most important thing here is that you use class="fancybox" as image control css class.

jQuery code is very very simple as you can see here:

       $(document).ready(function () {
            $(".fancybox").fancybox();
        });


There are more cases in how to use fancybox that you can check at FancyBox.

Effect that we managed to create looks like this:

When we click on image we get this.

So, long, folks!

Best ASP.NET Core 1.0 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 :: Easy Steps to Change CSS programmatically in C# ASP.NET

clock June 20, 2016 21:45 by author Dan

In this example we explain that how to change CSS dynamically from code behind in asp.net using C#. or how to change CSS file programmatically in C# code(back end  code) in asp.net.

Some time we have requirement like if user click on or check Lightweight button then Lightweight CSS is apply to the application for these user only same like if user checked or click on Professional button then Professional look is applied to the application for these user only these totally is dynamic and depend on user requirement.

So how to change or switch CSS file dynamically from code behind in asp.net using C#.

ChangeCSSFileDynamically.aspx:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ChangeCSSFileDynamically.aspx.cs"
    Inherits="WebApplication1.ChangeCSSFileDynamically" %>

<!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 id="Head1" runat="server">
    <title>Dynamically change (switch) CSS file programmatically from code behind in ASP.Net</title>
    <link id="lnkCSS" runat="server" href="~/CSS/Lightweight.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <asp:Label ID="Label1" runat="server" Text="This is a Label" CssClass="label"></asp:Label>
    <hr />
    <asp:RadioButton ID="chkLightWeight" runat="server" GroupName="CSSTheme" AutoPostBack="true" Text="LightWeight"
        OnCheckedChanged="chkLightWeight_CheckedChanged1" />
    <asp:RadioButton ID="chkProfessional" runat="server" GroupName="CSSTheme" AutoPostBack="true" Text="Professional"
        OnCheckedChanged="chkProfessional_CheckedChanged1" />
    </form>
</body>
</html>

ChangeCSSFileDynamically.aspx.cs:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WebApplication1
{
    public partial class ChangeCSSFileDynamically : System.Web.UI.Page
    {

        protected void chkLightWeight_CheckedChanged1(object sender, EventArgs e)
        {
            lnkCSS.Attributes["href"] = "~/CSS/Lightweight.css";
        }

        protected void chkProfessional_CheckedChanged1(object sender, EventArgs e)
        {
            lnkCSS.Attributes["href"] = "~/CSS/Professional.css";
        }
    }
}

Lightweight.css:

body
{
    font-family:Times New Roman;
    font-size:10pt;
}
.label
{
    font-weight:bold;
    color:Purple;
}

Professional.css:

body
{
    font-family:Arial;
    font-size:bold;
}
.label
{
    font-weight:bold;
    color:yellow;
}

Best ASP.NET Core 1.0 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.



Cheap ASP.NET Hosting Tips :: How to Integrate Paypal in ASP.NET Site

clock July 11, 2014 09:17 by author Ben

This article discusses integration of PayPal Payment in ASP.NET web application. Nowadays PayPal is the most popular payment gateway worldwide because it is totally free to integrate and PayPal does not charge anything for opening an account, you will pay PayPal when you get paid. And the amount is also lower than other payment gateways.

PayPal supports several types of payments:

  • Payments for goods in the PayPal cart. PayPal is responsible for all operations supporting the cart in this case. Unfortunately, this option does not provide the maximum flexibility that is required to implement some projects, so the article does not consider this option.
  • Recurring billing or subscription. PayPal provides a subscription capability; that means that a definite sum will be periodically transferred from the user's account to the seller's account. The user can unsubscribe anytime. The seller can specify the subscription's period and cost. He also can organize a trial period to let the user assess the quality of services he provides. The trial period can be either paid or free.
  • "One click" shopping. Goods are not put into the cart in this case. This method also is used to pay for goods in a cart that was filled without PayPal. That's why this option provides maximum flexibility and full control of the cart.


Let’s start step by step work to integrate PayPal payment :

1.  Create PayPal account on PayPal Sandbox: Basically, PayPal provides an environment to developer that how they can integrate PayPal payment in their website. So just open URL: https://developer.paypal.com/ and click on SignUp option.

2. Create buyer (Personal Account) and one seller account (Business Account) PayPal account.

3. Having a valid PayPal API Token Key

4. Having PayPal business account email id

5. Create New Page on ASP.NET project and copy this script :

On ASPX PAGE:

<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"

    CodeFile="Default.aspx.cs" Inherits="_Default" %>

 

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">

</asp:Content>

<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">

    <div>

        <table width="700" align="center" cellpadding="0" cellspacing="0">

            <tr>

                <td height="60">

                    <b>Paypal Integration in ASP.NET</b>

                </td>

            </tr>

            <tr>

                <td height="40" align="center">

                    <asp:GridView ID="gvPayPal" runat="server" AutoGenerateColumns="False" OnRowCommand="gvPayPal_RowCommand"

                        BackColor="#DEBA84" BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px"

                        CellPadding="3" CellSpacing="2">

                        <RowStyle ForeColor="#8C4510" BackColor="#FFF7E7" />

                        <Columns>

                            <asp:TemplateField HeaderText="Product Name">

                                <ItemTemplate>

                                    <asp:Label ID="lblName" runat="server" Text='<%#Eval("prodName") %>'></asp:Label>

                                </ItemTemplate>

                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Product Description">

                                <ItemTemplate>

                                    <asp:Label ID="lblDescription" runat="server" Text='<%#Eval("prodDesc") %>'></asp:Label>

                                </ItemTemplate>

                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Product price">

                                <ItemTemplate>

                                    <asp:Label ID="lblProductPrice" runat="server" Text='<%#Eval("prodPrice") %>'></asp:Label>

                                </ItemTemplate>

                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Buy Now">

                                <ItemTemplate>

                                    <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/images/buy.png"

                                       Width="64" Height="64" CommandName="buy" CommandArgument="<%# ((GridViewRow) Container).RowIndex %>" />

                                </ItemTemplate>

                            </asp:TemplateField>

                        </Columns>

                        <FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />

                        <PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />

                        <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />

                        <HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />

                        <SortedAscendingCellStyle BackColor="#FFF1D4" />

                        <SortedAscendingHeaderStyle BackColor="#B95C30" />

                        <SortedDescendingCellStyle BackColor="#F1E5CE" />

                        <SortedDescendingHeaderStyle BackColor="#93451F" />

                    </asp:GridView>

                </td>

            </tr>

        </table>

        <!-- PayPal Logo -->

        <table border="0" cellpadding="10" cellspacing="0" align="center">

            <tr>

                <td align="center">

                </td>

            </tr>

            <tr>

                <td align="center">

                    <a style="cursor:pointer;" title="Paypal payment gateway center" onclick="javascript:window.open('https://www.paypal.com/cgi-bin/webscr?cmd=xpt/Marketing/popup/OLCWhatIsPayPal-outside','olcwhatispaypal','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=400, height=350');">

                        <img src="https://www.paypal.com/en_US/i/bnr/horizontal_solution_PPeCheck.gif" border="0"

                            alt="Solution Graphics"></a>

                </td>

            </tr>

        </table>

        <!-- PayPal Logo -->

    </div>

</asp:Content>

On CS PAGE :

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

using System.Configuration;

using System.Data.SqlClient;

using System.Data;

 

public partial class _Default : System.Web.UI.Page

{

    SqlConnection Con = new SqlConnection(ConfigurationManager.ConnectionStrings["ApplicationServices"].ToString());

    SqlCommand cmd = new SqlCommand();

    SqlDataAdapter da = new SqlDataAdapter();

    DataTable dt = new DataTable();

    DataRow dr;

 

    protected void Page_Load(object sender, EventArgs e)

    {

        if (!Page.IsPostBack)

        {

            //Add some column to datatable display some products information           

            dt.Columns.Add("prodName");

            dt.Columns.Add("prodDesc");

            dt.Columns.Add("prodPrice");

 

            //Add rows with datatable and bind in the grid view

            dr = dt.NewRow();

            dr["prodName"] = "MindStick Cleaner";

            dr["prodDesc"] = "Cleans all system dummy data";

            dr["prodPrice"] = "$100.00";

            dt.Rows.Add(dr);

 

            dr = dt.NewRow();

            dr["prodName"] = "MindStick DataConverter";

            dr["prodDesc"] = "Helps to import export data in different format";

            dr["prodPrice"] = "$120.00";

            dt.Rows.Add(dr);

 

            dr = dt.NewRow();

            dr["prodName"] = "MindStick SurveyManager";

            dr["prodDesc"] = "Helps creating survey page with specified format dll";

            dr["prodPrice"] = "$140.00";

            dt.Rows.Add(dr);

 

            dr = dt.NewRow();

            dr["prodName"] = "MindStick TeraByte Importer";

            dr["prodDesc"] = "Data transfer utility";

            dr["prodPrice"] = "$30.00";

            dt.Rows.Add(dr);

 

            gvPayPal.DataSource = dt;

            gvPayPal.DataBind();

        }

    }

 

    protected void gvPayPal_RowCommand(object sender, GridViewCommandEventArgs e)

    {

        if (e.CommandName == "buy")

        {

            ImageButton ib = (ImageButton)e.CommandSource;

            int index = Convert.ToInt32(ib.CommandArgument);

            GridViewRow row = gvPayPal.Rows[index];

 

            //Get each Column label value from grid view and store it in label

            Label pName = (Label)row.FindControl("lblName");

            Label pDescription = (Label)row.FindControl("lblDescription");

            Label pPrice = (Label)row.FindControl("lblProductPrice");

 

            //Here store that person name who are going to make transaction

            Session["user"] = "Arun Singh";

 

            // make query string to store logged in user information in sql server table         

            string query = "";

            query = "insert into purchase(pname,pdesc,price,uname) values('" + pName.Text + "','" + pDescription.Text + "','" + pPrice.Text.Replace("$", "") + "','" + Session["user"].ToString() + "')";

            Con.Open();

            cmd = new SqlCommand(query, Con);

            cmd.ExecuteNonQuery();

            Con.Close();

 

            //Pay pal process Refer for what are the variable are need to send http://www.paypalobjects.com/IntegrationCenter/ic_std-variable-ref-buy-now.html

 

            string redirectUrl = "";

 

            //Mention URL to redirect content to paypal site

            redirectUrl += "https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_xclick&business=" + ConfigurationManager.AppSettings["paypalemail"].ToString();

 

            //First name I assign static based on login details assign this value

            redirectUrl += "&first_name=Arun_Seller";

           

            //Product Name

            redirectUrl += "&item_name=" + pName.Text;

 

            //Product Amount

            redirectUrl += "&amount=" + pPrice.Text;

 

            //Business contact paypal EmailID

            redirectUrl += "&business=arunse_1358772383_biz@gmail.com";

 

            //Shipping charges if any, or available or using shopping cart system

            redirectUrl += "&shipping=5";

 

            //Handling charges if any, or available or using shopping cart system

            redirectUrl += "&handling=5";

 

            //Tax charges if any, or available or using shopping cart system

            redirectUrl += "&tax=5";

 

            //Quantiy of product, Here statically added quantity 1

            redirectUrl += "&quantity=1";

 

            //If transactioin has been successfully performed, redirect SuccessURL page- this page will be designed by developer

            redirectUrl += "&return=" + ConfigurationManager.AppSettings["SuccessURL"].ToString();

 

            //If transactioin has been failed, redirect FailedURL page- this page will be designed by developer

            redirectUrl += "&cancel_return=" + ConfigurationManager.AppSettings["FailedURL"].ToString();

 

            Response.Redirect(redirectUrl);

        }

    }

}

 

On DESIGN PAGE :

USE [MyDatabase]

GO

 

/****** Object:  Table [dbo].[purchase]    Script Date: 01/27/2013 09:26:07 ******/

SET ANSI_NULLS ON

GO

 

SET QUOTED_IDENTIFIER ON

GO

 

SET ANSI_PADDING ON

GO

 

CREATE TABLE [dbo].[purchase](

      [Id] [int] IDENTITY(1,1) NOT NULL,

      [PName] [nvarchar](100) NULL,

      [PDesc] [nvarchar](100) NULL,

      [Price] [money] NULL,

      [Uname] [varchar](50) NULL,

 CONSTRAINT [PK_purchase] PRIMARY KEY CLUSTERED

(

      [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

 

SET ANSI_PADDING OFF

GO

On web.config file:

<?xml version="1.0"?>

<!--

  For more information on how to configure your ASP.NET application, please visit

  http://go.microsoft.com/fwlink/?LinkId=169433

  -->

<configuration>

  <connectionStrings>

    <add name="ApplicationServices" connectionString="data source=Arun-PC;Integrated Security=true; Initial Catalog= MyDatabase; User Id= Arun-PC; Password= mindstick;" providerName="System.Data.SqlClient"/>

  </connectionStrings>

  <system.web>

    <compilation debug="true" targetFramework="4.0"/>

    <authentication mode="Forms">

      <forms loginUrl="~/Account/Login.aspx" timeout="2880"/>

    </authentication>

    <membership>

      <providers>

        <clear/>

        <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/"/>

      </providers>

    </membership>

    <profile>

      <providers>

        <clear/>

        <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/"/>

      </providers>

    </profile>

    <roleManager enabled="false">

      <providers>

        <clear/>

        <add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/"/>

        <add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/"/>

      </providers>

    </roleManager>

  </system.web>

  <appSettings>

    <add key="token" value="(insert your paypal API Signature) "/>

    <add key="paypalemail" value="(insert with paypal login email id)"/>

    <!--Here i used sandbox site url only if you hosted in live change sandbox to live paypal URL-->

    <add key="PayPalSubmitUrl" value="https://www.sandbox.paypal.com/cgi-bin/webscr"/>

    <add key="FailedURL" value="http://localhost:49666/PayPalIntegration/Failed.aspx"/> <!--Failed Page URL-->

    <add key="SuccessURL" value="http://localhost:49666/Default.aspx"/> <!--Success Page URL-->

  </appSettings>

  <system.webServer>

    <modules runAllManagedModulesForAllRequests="true"/>

  </system.webServer>

</configuration>

6. Run the project to see the result.

 

Look no further! You have found the answer. ASPHostPortal.com is your ASP.NET 4.5 hosting home! We understand that as .NET developer, you need to find good .NET hosting that provide reliable and cheap .NET hosting. ASPHostPortal.com supports the latest .NET framework, .NET 4.5, as well as past frameworks like .NET 4, .NET 3.5, and .NET 2.0. All of our .NET hosting comes with FREE Trial Hosting. If the service does not meet your expectations, simply cancel before the end of the free trial period. No Risk!! Why wait longer?



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

 photo ahp banner aspnet-01_zps87l92lcl.png

 

Corporate Address (Location)

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

Tag cloud

Sign in