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

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.



ASP.NET Core 1.0 Hosting - ASPHostPortal.com :: 7 Advantages When Using JQuery in ASP.NET

clock June 17, 2016 22:52 by author Dan

These days there are plenty of options available in case of frameworks as well as programs for the creation of webpages. One program that helps in easy scripting as well as programming is ASP.NET; jQuery gives great benefit to the program. The open source light weight JavaScript library called jQuery is a fantastic option for easy and fast HTML DOM manipulation as well as traversing, client side animations as well as scripting, event handling, etc. It also helps in easy integration of your SharePoint and ASP.Net applications. The combination of both the programs is quite intriguing which helps you create server-side dynamic websites very easily.

You can use both together very easily. Microsoft programs in fact, are bundled with jQuery so that it may be used with ASP.Net. Visual Studio is one such program which acts as the key for the creation of web pages along with coding in several languages through intellisense. In case, there is no integration between the two you simply have to download the recent jQuery library which is easily available from jQuery.com; then copy or unzip the file in the website project's root directory.

Advantages

More functionality with less writing - A huge benefit offered by this is that very less code is needed for performing of several complicated client side operations by virtue of several chaining mechanisms, selector expressions support along with other familiar features that make it easier to conduct complex DOM manipulation. The chaining mechanism helps in code reduction.

Easy, fast and lightweight -
From point of size the library is only 20KB in compressed form which makes it light, as such the execution time is less as well. When using the platform, the sheer simplicity can be easily understood. When compared to the normal JavaScript code, the development time is quite less. There are also no security risks associated; it may be included in the project simply like any JavaScript file.

Different codes than HTML mark ups - Client side scripts can be easily separated from HTML mark ups by virtue of the library. The program's $(document).ready() function enables this function. When the library is being used, the HTML code can be made neat with the combination of any JavaScript code. In fact the code can even be separated into separate file to link it to aspx page.

Cross browser compatibility -
The code is compatible with every browser which prevents any necessity for writing individual client side code meant for various browsers. When using the program to maintain cross browser compatibility, the css properties should be set so that they are compatible accordingly.

Presence of several plug-ins - The internet has several plug-ins freely available for use in the projects. There is a huge directory of plug-ins which accounts for the high jQuery usage which is growing each day. In fact, many of the available plug-ins may be re-used.

Lightweight and easy Ajax application -
A huge advantage of using the library lies in the development of light weight Ajax application with JSON support in ASP.Net. The library helps in prevention of bulky UpdatePanel control meant for Ajax communications.

Use of Content Distribution Network for internet sites - For the sites which are hosted on internet, the using of library hosted by Google CDN becomes easy. Major open source widely used JavaScript libraries are used globally across sites by virtue of the network. This helps in the management of recent updates, bug fixes as well as provision of high speed access for better caching.

Other advantages are easy integration between jQuery and ASP.NET Ajax projects and extension of existing functionality. In fact, the benefits do not simply stop with those mentioned here. When the platform is actually used, then only you will be able to understand a lot more points. There are no security risks associated with the usage which gives yet another benefit to the developers.

You can hire developers from top asp.net application development companies in India who can help you build web applications according to your ideas within allocated budget and time schedules.

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.



ASPHostPortal.com Announces ASP.NET Core 1.0 Hosting Solution

clock April 26, 2016 23:37 by author Dan

ASPHostPortal.com is a well-known Windows hosting company and even one of the most famous, though it is one of the oldest Windows hosting companies. Our packages have gone through major changes recently, and all of them goes for the goodness of every customers. Today, we launch ASP.NET Core 1.0 hosting with interested hosting packages.

3 months ago, the ASP.NET team announced during the weekly ASP.NET Community Standup was decided to rename ASP.NET 5 to ASP.NET Core 1.0. The whole “ASP.NET 5 MVC 6 Web API 2 sub-component version scheme was confusing. They’ve been working towards “One ASP.NET” now for years and they’re there. ASP.NET Core is versioned as 1.0 as it’s a near complete rewrite of ASP.NET with many new features and capabilities. It’s clearly a different product than ASP.NET 4.6.

.NET Core is a modular, streamlined subset of the .NET Framework and CLR. It is fully open-source and provides a common set of libraries that can be targeted across numerous platforms. Its factored approach allows applications to take dependencies only on those portions of the CoreFX that they use, and the smaller runtime is ideal for deployment to both small devices (though it doesn’t yet support some) as well as cloud-optimized environments that need to be able to run many small applications side-by-side. Support for targeting .NET Core is built into the ASP.NET 5 project templates that ship with Visual Studio 2015.

ASPHostPortal.com offers ASP.NET Core 1.0 Hosting with an interested hosting plan. We support this new technology with affordable price, a lot of ASP.NET 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 ASP.NET Core 1.0 Hosting, please visit http://asphostportal.com/ASPNET-Core-1-0-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