Full Trust European Hosting

BLOG about Full Trust Hosting and Its Technology - Dedicated to European Windows Hosting Customer

ASP.NET MVC 5 Hosting - HostForLIFE.eu :: How To Create Dropdown Menu?

clock May 4, 2016 00:37 by author Anthony

In this article, I will explain about how to implement Dropdown list in ASP.NET MVC. In traditional ASP.NET it is very easy to implement just by drag and dropping where we want. But in MVC we need some attention to create Drop Downlist.We have Dropdown list Html helper in ASP.NET MVC but we need to know how to bind data to Dropdown list Html helpers.
we can implement Drop down list in ASP.NET MVC in 2 ways.


Free ASP.NET Hosting - Europe

1.Using normal HTML Controls(select tag):

We can implement  dropdownlist using HTML <select/> tag like below
 ExampleCode:


<select id="html_dropdown">
    <option>--Select--</option>
    <option>India</option>
    <option>US</option>
    <option>China</option>
    <option>Russia</option>
    <option>United Kingdom</option>
</select>


2.Using HTML helpers:

Method 1: 


It is very easy to implement dropdownlist using normal html tags. But, if you want to bind data dynamically to the HTML tags it becomes complicated.To overcome and to make it easy to bind data to Html controls Microsoft introduced HTML helpers Methods.Here we are using Dropdown HTML helper to bind object data to Dropdownlist
.


Advantages:
1.It is also easy to implement.
2.Dynamic binding of data is very easy
3.We can easily implement cascading dropdownlists
Note:In method 1 i am sending data from controller using ViewBag. 


ExampleCode:

//Using ViewBag
            List<selectlistitem> item = new List<selectlistitem>();
            item.Add(new SelectListItem { Text = "India", Value = "1" });
            item.Add(new SelectListItem { Text = "China", Value = "2" });
            item.Add(new SelectListItem { Text = "United Sates", Value = "3" });
            item.Add(new SelectListItem { Text = "Srilanka", Value = "4" });
            item.Add(new SelectListItem { Text = "Germany", Value = "5" });
            ViewBag.html_helper_dropdown = item;
</selectlistitem></selectlistitem>

View code:

@using (Html.BeginForm())
{
    @Html.DropDownList("html_helper_dropdown","--select--")
}


Method 2:


In this i am sending data using ViewData to Controller with the same data source


Code:

List<selectlistitem> item = new List<selectlistitem>();
 item.Add(new SelectListItem { Text = "India", Value = "1" });
 item.Add(new SelectListItem { Text = "China", Value = "2" });
 item.Add(new SelectListItem { Text = "United Sates", Value = "3" });
 item.Add(new SelectListItem { Text = "Srilanka", Value = "4" });
 item.Add(new SelectListItem { Text = "Germany", Value = "5" });
ViewData["viewdata_ddl"] = item;
</selectlistitem></selectlistitem>

view code:

<p>Using View data</p>
@using (Html.BeginForm())
{
    @Html.DropDownList("viewbag_dropdown",ViewData["viewdata_ddl"] as List<SelectListItem>, "--select--")
}


Method 3:


Model binding.In this method we are binding the data using Model.This method mainly used for Strongly typed Views.


1.First create a model class with the 2 properties. one for Dropdown values and another for storing the selected value.


Model.cs:

using System.Collections.Generic;
using System.Web.Mvc;
 
namespace Dropdownlist.Models
{
    public class Model
    {
        public string selectedType { get; set; }
        public IEnumerable<selectlistitem> CountryList { get; set; }
    }
}
</selectlistitem>


Then prepare data source in controller and send the data through return View() method


Controller code:

using System;
using System.Collections.Generic;
using System.Web.Mvc;
using Dropdownlist.Models;
 
namespace Dropdownlist.Controllers
{
    public class HomeController : Controller
    {
 
        public ActionResult Index()
        {
            //Using ViewBag
            List<selectlistitem> item = new List<selectlistitem>();
            item.Add(new SelectListItem { Text = "India", Value = "1" });
            item.Add(new SelectListItem { Text = "China", Value = "2" });
            item.Add(new SelectListItem { Text = "United Sates", Value = "3" });
            item.Add(new SelectListItem { Text = "Srilanka", Value = "4" });
            item.Add(new SelectListItem { Text = "Germany", Value = "5" });
            ViewBag.html_helper_dropdown = item;
 
            //using ViewData
            ViewData["viewdata_ddl"] = item;
 
            //using Model binding
            var model = new Model
            {
                CountryList = item
             };
            return View(model);
        }
 
    }
}
</selectlistitem></selectlistitem>

View code as follows:

<p>Using Model </p>
@using (Html.BeginForm())
{
    @Html.DropDownListFor(x=>x.selectedType,Model.CountryList,"--select--")
}


Index.cshtml:

@using Dropdownlist.Models
@model Model
@{
    ViewBag.Title = "Dropdown list demo";
}

<h1>Dropdown list</h1>
<h3>Drop downlist using HTML</h3>
<select id="html_dropdown">
    <option>--Select--</option>
    <option>India</option>
    <option>US</option>
    <option>China</option>
    <option>Russia</option>
    <option>United Kingdom</option>
</select>
<br/>
<h3>Using Html helpers </h3>
<p>Method 1:</p><br/>
<p>Here the data was sent from Controller through ViewBag</p>
@using (Html.BeginForm())
{
    @Html.DropDownList("html_helper_dropdown","--select--")
}
<br/>
<p>Method 2:</p>
<p>Using View data</p>
@using (Html.BeginForm())
{
    @Html.DropDownList("viewbag_dropdown",ViewData["viewdata_ddl"] as List<SelectListItem>, "--select--")
}
<p>Method 3:</p>
<p>Using Model </p>
@using (Html.BeginForm())
{
    @Html.DropDownListFor(x=>x.selectedType,Model.CountryList,"--select--")
}

Note: We can also bind the dropdownlist data using ENUM's and arrays also.But, above are the most reliable and used by many developers (in our company also developers uses this methods only.).
Finally i got output like this.

 

 

 

HostForLIFE.eu ASP.NET MVC 5 Hosting
HostForLIFE.eu revolutionized hosting with Plesk Control Panel, a Web-based interface that provides customers with 24x7 access to their server and site configuration tools. Plesk completes requests in seconds. It is included free with each hosting account. Renowned for its comprehensive functionality - beyond other hosting control panels - and ease of use, Plesk Control Panel is available only to HostForLIFE's customers. They
offer a highly redundant, carrier-class architecture, designed around the needs of shared hosting customers.

 

http://aspnetmvceuropeanhosting.hostforlife.eu/image.axd?picture=2015%2f10%2fhostforlifebanner.png



ASP.NET MVC 4 Hosting - HostForLIFE.eu :: How To Add MVC Model?

clock April 26, 2016 23:28 by author Anthony

Model–view–controller (MVC) is a software architectural pattern for implementing user interfaces on computers. It divides a given software application into three interconnected parts, so as to separate internal representations of information from the ways that information is presented to or accepted from the user.

Free ASP.NET Hosting - Europe

Traditionally used for desktop graphical user interfaces (GUIs), this architecture has become extremely popular for designing web applications.

MVC

The MVC(Model View Controller) separates an application into three main components.
This includes Model,View and Controller.
In this article, mainly explained about Models.


Models

Model represents an object. Model is resposible for maintaining the data
It respond to the request from view. It also respond to the instruction from controller for the updation.

Model objects retrieve and store model state in a database.
For example, a Student object might retrieve information from a StudentData Database, operate on it, and then write updated information back to a StudentData table in a SQL Server database.

In MVC, model both hold and manipulate application data. It contains all the application logic except view and controller logic

Model Folder contains the classes of application.


Model Adding

We can add models to our application with the following steps

  • A model folder will be present under the created application's Solution Explorer.

  • Right click on Model folder. A list will be appearing
  • Select 'Add' option from list.Then a new list will be coming.
  • Then select 'Class' option from list
  • A new window appearing.Here give the name for the new class or model and select 'Add'.(Say model name as SampleModel)
  • The newly added class will be appearing.That is, this will create a model class to the application.
  • Inside this class, we can add properties as per the requirements. Example is given below.
  •  


HostForLIFE.eu ASP.NET MVC 4 Hosting
HostForLIFE.eu is European Windows Hosting Provider which focuses on Windows Platform only. We deliver on-demand hosting solutions including Shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes. We have customers from around the globe, spread across every continent. We serve the hosting needs of the business and professional, government and nonprofit, entertainment and personal use market segments.

     



Joomla 3.5 Hosting - HostForLIFE.eu :: Joomla 3.5 Beta Testing

clock April 14, 2016 23:15 by author Anthony

Joomla is an award-winning content management system (CMS), which enables you to build Web sites and powerful online applications. Many aspects, including its ease-of-use and extensibility, have made Joomla the most popular Web site software available. Best of all, Joomla is an open source solution that is freely available to everyone.

Free ASP.NET Hosting - Europe

Joomla is used all over the world to power Web sites of all shapes and sizes. For example:

  • Corporate Web sites or portals
  • Corporate intranets and extranets
  • Online magazines, newspapers, and publications
  • E-commerce and online reservations
  • Government applications
  • Small business Web sites
  • Non-profit and organizational Web sites
  • Community-based portals
  • School and church Web sites
  • Personal or family homepages

Joomla 3.5 was released on February 17, 2016. Here is a glimpse of what will be on Joomla 3.5. Joomla users have the opportunity to test the beta and pre-release versions given by the official Joomla development team.

If you are using Joomla and would like to contribute or you just want to test the latest features of Joomla 3.5 and its extensions, of course this is very useful. You can find some of the features that may not have been perfect and needs to be improved to be released in due course.

This time I will show you how to test the beta version of Joomla 3.5 on your website that Joomla version 3.4.x.
# Note: Do not do this test on your website is running, it helps you create a duplicate to avoid the risks that can be generated.

Step # 1. Turn Mode Update Version Joomla For Testing

Access to the menu Components -> Joomla Update -> Click on the "Option"

Update Enable Channel to "Testing"

Then click the "Save and close".
Step # 2. Fix Joomla to Beta
If there is a Joomla test version available (it will commonly use the suffix -beta # in "Latest Joomla version" row), click the "Install the update" button and wait until the process ends.

Step # 3. The trial version of Joomla Beta

Until this stage, you have managed to make updates to the Joomla 3, if you find features that have not been perfect, immediately report it to Github repository page, hopefully Joomla core team can fix it on the next regular release schedule.

 


HostForLIFE.eu Joomla 3.5 Hosting
HostForLIFE.eu is European Windows Hosting Provider which focuses on Windows Platform only. We deliver on-demand hosting solutions including Shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes. We have customers from around the globe, spread across every continent. We serve the hosting needs of the business and professional, government and nonprofit, entertainment and personal use market segments.



AJAX Hosting :: HostForLIFE.eu :: How to Work With PHP and MySQL?

clock April 12, 2016 23:12 by author Anthony

Today we will discuss about Ajax. Ajax is a collection of several technologies aiming to provide a better user experience compared to traditional web applications. End to end implementation of Ajax includes HTML, CSS, DOM, JavaScript, a Server Side Language, and XMLHttpRequest which is also called as XHR.

In traditional web applications, the browser sends a request to server, server processes, send some data back to browser and then it is rendered by the browser. But meanwhile, when server is processing, user has to wait. This, needless to say, does not provide the user with a good experience. Ajax, helps to get rid of the issue. It makes the user's interaction to the application asynchronous. User interface and communicating to the server goes hand in hand and without waiting for the server to come with the processed data or without reloading the webpage, the user interface responds to user's action; greatly improving user experience.

In this tutorial we will see how to make Ajax work with PHP and MySQL. We will create a small web application. In that, as soon as you start typing an alphabet in the given input field, a request goes to the PHP file via Ajax, a query is made to the MySQL table, it returns some results and then those results are feteched by Ajax and displayed.

You need to make MySQL table. The structure of the MySQL table we use.

mysql table for ajax php mysql tutorial

We have a simple user inerface created with HTML and CSS where user can supply data in the input field. This is the basic HTML code. Though, we will make modifications on it and add JavaScript code later.

<!DOCTYPE html>  
<html lang="en">  
<head>  
<meta charset="utf-8">  
<title>User interface for Ajax, PHP, MySQL demo</title>  
<meta name="description" content="HTML code for user interface for Ajax, PHP and MySQL demo.">  
<link href="../includes/bootstrap.css" rel="stylesheet"> 
<style type="text/css"> 
body {padding-top: 40px; padding-left: 25%} 
li {list-style: none; margin:5px 0 5px 0; color:#FF0000} 
</style> 
</head> 
<body> 
<form class="well-home span6 form-horizontal" name="ajax-demo" id="ajax-demo"> 
<div class="control-group"> 
              <label class="control-label" for="book">Book</label> 
              <div class="controls"> 
                <input type="text" id="book"> 
              </div> 
 </div> 
 <div class="control-group"> 
              <div class="controls"> 
                <button type="submit" class="btn btn-success">Submit</button> 
              </div> 
 </div> 
</form> 
</body> 
</html> 

This is how it looks :

user interface for ajax demo

We will now create JavaScript code to send data to server. And we will call that code on onkeyup event of the of the input field given.

function book_suggestion() 

var book = document.getElementById("book").value; 
var xhr; 
 if (window.XMLHttpRequest) { // Mozilla, Safari, ... 
    xhr = new XMLHttpRequest(); 
} else if (window.ActiveXObject) { // IE 8 and older 
    xhr = new ActiveXObject("Microsoft.XMLHTTP"); 

var data = "book_name=" + book; 
     xhr.open("POST", "book-suggestion.php", true);  
     xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");                   
     xhr.send(data); 

Processing data on server side

<?php 
include('../includes/dbopen.php'); 
$book_name = $_POST['book_name']; 
$sql = "select book_name from book_mast where book_name LIKE '$book_name%'"; 
$result = mysql_query($sql); 
while($row=mysql_fetch_array($result)) 

echo "<p>".$row['book_name']."</p>"; 

?> 

Now we have to retreive data returned by MYSQL and display that data using Ajax. So, we will write that code in our HTML file. We will add follwing code

xhr.onreadystatechange = display_data; 
    function display_data() { 
     if (xhr.readyState == 4) { 
      if (xhr.status == 200) { 
       document.getElementById("suggestion").innerHTML = xhr.responseText; 
      } else { 
        alert('There was a problem with the request.'); 
      } 
     } 
  }

We have to add <div id="suggestion"></div> bellow the input field whose id is book.

Now we set the value of the string to be displayed within the div whose id is 'suggestion' as 'responseText' property of the XMLHttpRequest object. 'responseText' is the response to the request as text.

So, the final JavaScript code of the HTML file becomes as follows:

  function book_suggestion() 

var book = document.getElementById("book").value; 
var xhr; 
 if (window.XMLHttpRequest) { // Mozilla, Safari, ... 
    xhr = new XMLHttpRequest(); 
} else if (window.ActiveXObject) { // IE 8 and older 
    xhr = new ActiveXObject("Microsoft.XMLHTTP"); 

var data = "book_name=" + book; 
     xhr.open("POST", "book-suggestion.php", true);  
     xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");                   
     xhr.send(data); 
     xhr.onreadystatechange = display_data; 
    function display_data() { 
     if (xhr.readyState == 4) { 
      if (xhr.status == 200) { 
       //alert(xhr.responseText);       
      document.getElementById("suggestion").innerHTML = xhr.responseText; 
      } else { 
        alert('There was a problem with the request.'); 
      } 
     } 
    } 

 

HostForLIFE.eu AJAX Hosting
HostForLIFE.eu revolutionized hosting with Plesk Control Panel, a Web-based interface that provides customers with 24x7 access to their server and site configuration tools. Plesk completes requests in seconds. It is included free with each hosting account. Renowned for its comprehensive functionality - beyond other hosting control panels - and ease of use, Plesk Control Panel is available only to HostForLIFE's customers. They offer a highly redundant, carrier-class architecture, designed around the needs of shared hosting customers.



Wordpress Hosting - HostForLIFE.eu :: How To Make The First Post?

clock April 8, 2016 00:01 by author Anthony

This tutorial will discuss how to create a new Page and Post on wordpress. Wherein the Post and Page this is the most will often be used when the website was built and after the website goes online, since Page and Post is the place where we put the information we want to upload on our website. If the website is used to blogging as well as for a news portal, then the Post will very often be used to post the latest posts.

WordPress was born out of a desire, wordpress initially ber personal publishing system architecture is elegantly built in PHP and MySQL and licensed under the GPL. WordPress is the official successor of b2 / cafelog. WordPress is a modern software for creating web, but wordpress developed back in 2001. It is a mature and stable. WordPress senidir wish to focus on user experience and web standards different tool with other existing web tool diluaran there. And now total 49% of websites worldwide are built with WordPress.

Here are the steps in the manufacture of a new Post and Page:

Click the sidebar menu on the dashboard pages, and then click add new as the picture below:

Membuat page baru

Bulk Action is used to remove or edit a page or post simultaneously by way of checking the page and posts would be deleted or edited. if you want to edit one by one simply by mensorot title of Page and Post will display the edit menu, trash and quick edit.

The next step to create a new Page after we click the button Add New.

Title is filled with About. Columns underneath used to fill what would we write and we publish. and if you want to insert a picture in the post-click Add Media and select the image you want to paste in your articles.

Featured Image: used to upload thumbnail images in posts

Immediately Publish: used to schedule our posts when the time to dipublis to our website.

Next make Post, essentially making the Post as well as make Page, for the menu to be clicked namely Posts and Add New, cuman difference in Post with Page that is located on the Categories and Tags, for writing Tag adjust to the discussion of the article already you write, in my example menulisakan CMS and WordPress, because my writing related to the topic, and the writing on the tag must be separated by commas. as shown below.

 

category&tag

 


HostForLIFE.eu Wordpress Hosting
HostForLIFE.eu revolutionized hosting with Plesk Control Panel, a Web-based interface that provides customers with 24x7 access to their server and site configuration tools. Plesk completes requests in seconds. It is included free with each hosting account. Renowned for its comprehensive functionality - beyond other hosting control panels - and ease of use, Plesk Control Panel is available only to HostForLIFE's customers. They
offer a highly redundant, carrier-class architecture, designed around the needs of shared hosting customers.

 



Magento Hosting - HostForLIFE.eu :: How To Install Magento Security Patch?

clock April 5, 2016 20:11 by author Anthony

Making money is serious business, and it does take time for every effort to nurture and mature. Online shopping is actually only a small part of the wilderness of e-commerce. Web shopping which includes online transactions stock, download the software directly from the web actually connecting businesses to consumers is only about 20% of the total e-commerce. In fact, more in the form of trade relations business to business that facilitates the process of purchasing between companies. Many people hope that the possible occurrence of micro-transactions that allow people to pay in the form of coins some thousand or hundred dollars to access content or games on the Internet. One CMS that is used to create an online shop is Magento.

Free ASP.NET Hosting - Europe

Magento is a premium shopping platform that Provides a platform online store with reviews Reviews their hosting packages. Features on Magento especially reporting features. This online store also handles complex system of discounts and voucher systems that can be integrated with other systems. Magento is an online shop for professionals who need a shopping system with detailed reporting. Magento has two versions items, Community (Open Source) and Professional.

Magento released a new patch for the Community Edition 1.9 and Enterprise Edition 1.14 to address security issues, including remote code execution and information leak vulnerabilities.

Be sure to test the patch in a development environment first, as it can affect extensions and customizations :

You can download the patch for both Community Edition and Enterprise Edition from the following options:

  • Partners: Go to the Partner Portal, select Technical Resources and then select Download from the Enterprise Edition panel. Next, navigate to Magento Enterprise Edition > Patches & Support and look for the folder titled “Security Patches – July-October.”
  • Enterprise Edition Merchants: Go to My Account, select the Downloads tab, and then navigate to Magento Enterprise Edition > Support Patches. Look for the folder titled “Security Patches – October 2015” .Merchants can also upgrade to the latest version of the Enterprise Edition and receive the security fixes as part of the core code.
  • Community Edition Merchants: Patches for earlier versions of Community Edition can be found on the Community Edition download page (look for SUPEE-67.88) Merchants can also upgrade today to the latest version of the Community Edition and receive the security fixes as part of the core code.

Before installing the patch check whether old patches are installed correctly. Some patches depend on other patches to be installed already.

Simply unpack the archive and replace files on your store by uploading app/ and lib/ folders into your Magento root directory.
If you use PHP opcode caches (APC/XCache/eAccelerator) make sure to flush it after patching, otherwise code will continue to run from caches.

If you have SSH access, it would be simpler to install the patch. Before installing the patch make sure to disable Magento Compiler at System > Configuration > Tools > Magento Compiler and clear compiled cache (if compiler is used).

If you have no SSH access, then to apply to the patch, you can simply upgrade your installation to the latest Magento version.

After the patch is installed successfully, check whether all CMS , home page, category pages and landing pages are running correctly without any issues. Magento security patch Supee 6788 affects the page layout, transaction emails and order confirmation notifications.

The Magento security patch supee 6788 has introduced new permissions for  blocks, core variables on CMS pages, templates and extensions. You can add your blocks in the admin section under System -> Permissions -> Blocks, or via setup scripts adding to the permission_block table.
Also, check if any other pages or blocks or transactional emails have been affected.

 

HostForLIFE.eu Magento Hosting
HostForLIFE.eu revolutionized hosting with Plesk Control Panel, a Web-based interface that provides customers with 24x7 access to their server and site configuration tools. Plesk completes requests in seconds. It is included free with each hosting account. Renowned for its comprehensive functionality - beyond other hosting control panels - and ease of use, Plesk Control Panel is available only to HostForLIFE's customers. They 
offer a highly redundant, carrier-class architecture, designed around the needs of shared hosting customers.



DotNetNuke 7.4 Hosting - HostForLIFE.eu :: How To Install DotNetNuke 7 on your PC?

clock March 31, 2016 20:01 by author Anthony

DotNetNuke is a web application framework that is open source using VB.NET language. Application of CMS can be expanded through the use of modules and skins so this application is used to create, deploy, and set up intranets, extranets and websites. DotNetNuke Professional Edition include the addition of security, stability, and support of products and applications warranty, and is available in a cheaper price than other applications.

Free ASP.NET Hosting - Europe

Moreover DotNetNuke is very easy to install on your PC. So the discussion this time. I will discuss how to install DotNetNuke on your PC. In general, DotNetNuke installation process does not take more than 15 minutes. But if you encounter an error, please check the back, make sure you have meet the minumum requirements for hardware and software you have to install DotNetNuke.

How To Install DotNetNuke 7 on your PC?

  • Create a folder on a Web server where DotNetNuke will be executed. For example, in this manual use the folder C: \ DotNetNuke, however, you can choose the location and name of the other. Set permission on this folder so that IIS uses the account "Full Control".

If IIS has not got the permissions "Full Control", right click on the root folder. Click "Sharing and Security" followed by the Security tab. If the Security tab does not exist, you have to "turn off" file sharing simply by choosing Tools> Folder Options, and then click the View tab. Uncheck the option "Use simple file sharing" and click OK. You can now right-click the root folder and access the Security tab

On the Security tab, tick-related accounts that have permissions "Full Control" to this folder (Windows XP using the account ASPNET and other editions of Windows using the account NETWORK SERVICE).

  • If you are using SQL Server, it is necessary to configure the DotNetNuke order to access the database. To do this open the file C: \ DotNetNuke \ web.config using Notepad application.

 Note : If you use the SQL Express configuration, there is no need for additional configuration INSTALL package is configured to use SQL Express by default.

  • Remove the following line at the connectionStrings:
    <Add name = "SiteSqlServer" connectionString = "Data Source =. \ SQLExpress; AttachDBFilename = | DataDirectory | Database.mdf; Integrated Security = True; User Instance = True" providerName = "System.Data.SqlClient" />
  • Delete this line in the appSettings:
    <Add key = "SiteSqlServer" value = "Data Source" =. \ SQLExpress; AttachDBFilename = | DataDirectory | Database.mdf; Integrated Security = True; User Instance = True "/>
  • Delete and edit the following line in the connectionStrings section to match the host name Database server and access your identity:
    <Add name = "SiteSqlServer" connectionString = "Server = (local); Database = DotNetNuke; uid =; pwd =;" providerName = "System.Data.SqlClient" />
  • Delete and edit the following line in the appSettings section to match the host name Database server and access your identity:
    <Add key = "SiteSqlServer" value = "Server = (local); Database = DotNetNuke; uid =; pwd =;" />
  • Save and close the web.config file. You can also store backup files with names web.config.bak as a precaution when the installation process fails and you need to start over.
  • Open the IIS Management Console application Start> Control Panel> Administrative Tools and expand Default Web Site. Create a new Virtual Directory named DotNetNuke then navigate to the folder C:\DotNetNuke. You can choose another name for the Virtual Directory liking (if you do, it needs to be adjusted on the instruction "DotNetNuke Wizard")

HostForLIFE.eu DotNetNuke 7.4 Hosting
HostForLIFE.eu revolutionized hosting with Plesk Control Panel, a Web-based interface that provides customers with 24x7 access to their server and site configuration tools. Plesk completes requests in seconds. It is included free with each hosting account. Renowned for its comprehensive functionality - beyond other hosting control panels - and ease of use, Plesk Control Panel is available only to HostForLIFE's customers. They 
offer a highly redundant, carrier-class architecture, designed around the needs of shared hosting customers.



Umbraco 7.2.8 Hosting UK - HostForLIFE.eu :: How to Reset Umbraco Password?

clock March 30, 2016 23:11 by author Anthony

Every computer user both desktop and computer connected to the network would have to know the username and password. Username is your identity to enter into a network, including ATM networks. While the password is the key to your username can be identified and can enter the network.

Username and password are very useful and should not be underestimated, because if your username and password known to other people, then all the data and systems that you have can be problematic. Therefore username and password is one of the important facilities in the computerized system. Besides passwords should be updated or updated at any time. For the system to which you have remained safe and comfortable.

The requirement to use a password:

  • Use a password that's at least 8 characters mixed with numbers and uppercase and lowercase letters.
  • Do not show while typing passwords on those around you.
  • Always remember your password.

Passwords are the key words that you have to remember, but there are times when you forgot your password. In this article, I will discuss how to reset the password on Umbraco 7 manually via database.You try to log into Umbraco but it turns out your password is incorrect. Not a problem as long as you have access to the database and filesystem. 

The first thing you should do is open SQL Manager later locate the folder umbracoUser. Umbraco user passwords stored in your database Umbraco in the umbracoUser table, in userPassword column.

In the table, look for your account to be reset, and make a note to Id you want to update. The password will be encrypted for security reasons, and the password will be stored as a hash for security. So we can not just simply typing long passwords in plain text and expect to get the results directly. We need to know the hash code for several common passwords.

1
2
userPassword Value :   /7IIcyNxAts3fvQYe2PI3d19cDU=
Password :             password
1
2
userPassword Value :   d9xnUXsUah9gycu7D0TpRYcx19c=
Password :             admin
1
2
userPassword Value :   bnWxWyFdCueCcKrqniYK9iAS+7E=
Password :             default

But Umbraco using hashing simple with just a few lines of code. You can generate your hashed password and put it in the user table Password column in umbracoUser table for your user account.

  1. string password = "mypassword";  
  2. HMACSHA1 hash = new HMACSHA1();  
  3. hash.Key = Encoding.Unicode.GetBytes(password);  
  4. string encodedPassword = Convert.ToBase64String(hash.ComputeHash(Encoding.Unicode.GetBytes(password))); 

You just use the generated hash the password and then update records in the table. After that you can log back into Umbraco with your new password.


HostForLIFE.eu Umbraco 7.2.8 Hosting

HostForLIFE.eu revolutionized hosting with Plesk Control Panel, a Web-based interface that provides customers with 24x7 access to their server and site configuration tools. Plesk completes requests in seconds. It is included free with each hosting account. Renowned for its comprehensive functionality - beyond other hosting control panels - and ease of use, Plesk Control Panel is available only to HostForLIFE's customers. They offer a highly redundant, carrier-class architecture, designed around the needs of shared hosting customers.





Umbraco 7.2.8 Hosting UK - HostForLIFE.eu :: How to Create a Comment Form using MVC in Umbraco

clock October 7, 2015 13:04 by author Rebecca

In this tutorial, I'll show you how to create a comment form using MVC in Umbraco. Many people had a lot of trouble working out how to create forms in Umbraco because a lot of the documentation around is either for an old version of Umbraco, using a third party library or just not very helpful!

So, we're going to start off with creating a partial view in the 'Partials' folder within the 'Views' folder, we'll then add the basic code needed to render the form and link it to a custom surface controller that we'll create in the 'App_Code' folder.

Step 1: Create the partial

Create a partial view in the 'Partials' folder located under the 'Views' folder and name it 'ContactForm' this will be where the GUI part of the form is located, it'll also be what's called from our view page to render the form.

Step 2: Adding the form

To create forms in MVC you can use a neat way of adding elements instead of writing the HTML, for example we can use 'LabelFor', 'EditorFor' and 'ValidationMessageFor' pretty neat right? All of these are preceded by [email protected]' because they're located under the 'Html' class.

See my example below and paste it into a partial view called 'CommentForm' to get started.

    @inherits Umbraco.Web.Mvc.UmbracoViewPage
    @{
        Layout = null;
    }
    
    @using (Html.BeginUmbracoForm("SubmitComment", "CommentFormSurface"))
    {
      @Html.LabelFor(x => Model.Name)
      @Html.EditorFor(x => Model.Name)
      @Html.ValidationMessageFor(x => Model.Name)
    
      @Html.LabelFor(x => Model.Email)
      @Html.EditorFor(x => Model.Email)
      @Html.ValidationMessageFor(x => Model.Email)
    
      @Html.LabelFor(x => Model.Comment)
      @Html.EditorFor(x => Model.Comment)
      @Html.ValidationMessageFor(x => Model.Comment)

This is esseintially the form that people will see and use on our website, it is linked to a model and controller which we will create in step three by means of an inherits statement in the first line which calls the 'CommentFormModel'.

Step 3: Setting up the model and controller

To create the model and controller, you need to create a new class file in the 'App_Code' folder and call it 'CommentController', within this file, you'll add the model and surface controller for your form, copy and paste the below code into the class file to get started.

    using System;
    using System.Collections.Generic;
    using System.ComponentModel.DataAnnotations;
    using System.Linq;
    using System.Net.Mail;
    using System.Text;
    using System.Web;
    using System.Web.Mvc;
    using Umbraco.Web.Mvc;
    using umbraco.BusinessLogic;
    using umbraco.cms.businesslogic.web;
    
    namespace LukeAlderton
    {
        ///
        /// Comment form controller deals with all comment systems
        ///
        public class CommentFormSurfaceController : SurfaceController
        {
            [HttpPost]
            public ActionResult SubmitComment(CommentFormModel model)
            {
                //model not valid, do not save, but return current umbraco page
                if (!ModelState.IsValid)
                {       
                    return CurrentUmbracoPage();
                }
    
                // Create the comment and add then data then publish it
                User author = new User(0);
                Document comment = Document.MakeNew(model.Name, DocumentType.GetByAlias("uBlogsyComment"), author, CurrentPage.Children.First().Id);
                comment.getProperty("uBlogsyCommentName").Value = model.Name;
                comment.getProperty("uBlogsyCommentEmail").Value = model.Email;
                comment.getProperty("uBlogsyCommentWebsite").Value = model.Website;
                comment.getProperty("uBlogsyCommentMessage").Value = model.Comment;
                comment.Publish(author);
                umbraco.library.UpdateDocumentCache(comment.Id);
    
                // Add date to the page
                //TempData.Add("SubmissionMessage", "Your comment was successfully submitted");
    
                // Redirect to current page to clear the form
                return RedirectToCurrentUmbracoPage();
    
                // Redirect to specific page
                //return RedirectToUmbracoPage(2525);
            }
        }
    
        public class CommentFormModel
        {
            [Required]
            [Display(Name = "Name")]
            public string Name { get; set; }
    
            [Required]
            [RegularExpression(@"^(([A-Za-z0-9]+_+)|([A-Za-z0-9]+\-+)|([A-Za-z0-9]+\.+)|([A-Za-z0-9]+\++))*[A-Za-z0-9]+@((\w+\-+)|(\w+\.))*\w{1,63}\.[a-zA-Z]{2,6}$", ErrorMessage = "Invalid Email Address")]
            public string Email { get; set; }
    
            [DataType(DataType.Url)]
            public string Website { get; set; }
    
            [Required]
            [DataType(DataType.MultilineText)]
            public string Comment { get; set; }
        }
    }


This controller is designed to replace the comment function of the uBlogsy comment system which adds a node under the post, within the comments node.

The top class called 'CommentFormSurfaceController' is the surface controller and it handles everything that happens after the form has been submitted, in our case we call the method 'SubmitComment' to add a comment to the post via it.

The lower class called 'CommentFormModel' is our view model and it handles the variables available to us and what they should be displayed as, this model has four variables which can all be accessed via 'model.variablename'.
Step Four: Using the form

To Use the form you simply add the following line into any view in your website:

    @Html.Partial("CommentForm",new LukeAlderton.CommentFormModel())

It's as simple as that!

HostForLIFE.eu Umbraco 7.2.8 Hosting
HostForLIFE.eu is European Windows Hosting Provider which focuses on Windows Platform only. We deliver on-demand hosting solutions including Shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes. We have customers from around the globe, spread across every continent. We serve the hosting needs of the business and professional, government and nonprofit, entertainment and personal use market segments.



AngularJS Hosting - HostForLIFE.eu :: How to Binding Table with JSON String using AngularJS?

clock September 14, 2015 06:39 by author Peter

Today, let me tell you about binding table with JSON String using Angular.This is a really easy Javascript function, that helps to convert Json String to a hypertext mark-up language Table by using AngularJS Frameworks. Define a well structured Json string as shown below, this Json string contains the information of two IT departments with the following code:

var dept1 = {  
    "data": [{  
            "Name": "Robert",  
            "City": "London",  
            "Country": "United Kingdom"  
    },  
            {  
            "Name": "Scott",  
            "City": "Manchester",  
            "Country": "United Kingdom"  
    },  
            {  
            "Name": "Rebecca",  
            "City": "Liverpool",  
            "Country": "United Kingdom"  
    },                    
            {  
            "Name": "Peter",  
            "City": "Bristol",  
            "Country": "United Kingdom"  
    },                    
            {  
            "Name": "Thomas",  
            "City": "Leeds",  
            "Country": "United Kingdom"  
    }]  
}  
var dept2 = {        
    "data": [  
            {  
            "Name": "Ethan",  
            "City": "Cardiff",  
            "Country": "United Kingdom"  
    },               
            {  
            "Name": "David",  
            "City": "Southampton",  
            "Country": "United Kingdom"  
    },                
            {  
            "Name": "Suzan",  
            "City": "Norwich",  
            "Country": "United Kingdom"  
    }  
]  
}
 

JS (Functions)
var app = angular.module('myApp', []);  
 
app.controller('employees', function($scope, $http) {  
    $scope.names = dept1.data;  
    $scope.next = function() {  
        $scope.names = dept2.data;  
    }  
     $scope.prev = function() {  
        $scope.names = dept1.data;  
    }  
});


HTML
<div ng-app="myApp" ng-controller="employees">    
    <input type="button" value="Development" ng-click="prev();">    
          <input type="button" value="Testing" ng-click="next();">    
    <table>    
        <tr ng-repeat="x in names">    
            <td>{{ x.Name }}</td>    
            <td>{{ x.Country }}</td>    
        </tr>    
    </table>    
</div>   
            

CSS
table {    
    border-collapse: collapse;    
    width: 100%;    
}    
th, td {    
    padding: 0.25rem;    
    text-align: left;    
    border: 1px solid #ccc;    
}    
tbody tr:hover {    
    background: yellow;    
}    

HostForLIFE.eu AngularJS Hosting
HostForLIFE.eu is European Windows Hosting Provider which focuses on Windows Platform only. We deliver on-demand hosting solutions including Shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes. We have customers from around the globe, spread across every continent. We serve the hosting needs of the business and professional, government and nonprofit, entertainment and personal use market segments.



About HostForLIFE.eu

HostForLIFE.eu is European Windows Hosting Provider which focuses on Windows Platform only. We deliver on-demand hosting solutions including Shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes.

We have offered the latest Windows 2012 Hosting, ASP.NET 4.5 Hosting, ASP.NET MVC 4 Hosting, and SQL 2014 Hosting.

Free ASP.NET Hosting - Europe

Tag cloud

Sign in