To reset the admin password of a Umbraco website. 1. In Sql server, run the following script on the database: USE INSERT-YOUR-DATABASE-NAME-HERE GO UPDATE umbracoUser set userdisabled=0, userLogin='admin', userPassword='default' where id=0 2. In your web config file, find the "UsersMemnershipProvider" section, change the setting: passwordFormat="Hashed" to passwordFormat="Clear" You should now be able to login using the Username: Admin and the Password: default ("the two sweetest words in the english language").
This is a Simple Contact From done in C# .Net and also can be used in Umbraco. Paste the code in to Visual Web Developer for a better view. The important bits are coment in the second file. One of the Commented out lines highlights how to get the mailto address from an Umbraco field. The code Below includes the myContactForm.ascx.cs codebehind file and the myContactForm.ascx file. 1) The myContactForm.ascx file: <%@ Control Language="C#" AutoEventWireup="true" CodeFile="ContactFormforPublications.ascx.cs" Inherits="usercontrols_ContactFormPublications" %> <div class="contact-form" id="contactForm" runat="server"> <h3>Request a Publication</h3> <div class='int'> <form runat="server"> <asp:Panel DefaultButton="contactFormSubmit" runat="server"> ...
Umbraco 8 Pagination / Paging: @inherits Umbraco.Web.Mvc.UmbracoViewPage @{ Layout = "master.cshtml"; var pageSize = 8; if(Model.HasValue("numberOfItemsPerPage")){ pageSize = Model.Value<int>("numberOfItemsPerPage");} var page = 1; int.TryParse(Request.QueryString["page"], out page); @* This line assumes you have a property called lastUpdated*@ var items = Model.Children().OrderByDescending(x => x.Value("lastUpdated")); @* Remove the line above and use this line to keep it simple *@ @* var items = Model.Children()); *@ var totalPages = (int)Math.Ceiling((double)items.Count() / (double)pageSize); if (page > totalPages) { ...
Comments
Post a Comment