
Oktober 11, 2012 08:28 by
Jervis
In this post, I'm going to take a bit more of a 'code-centric" no-nonsense approach to what your form should really look like, I hope that this helps you. To help make this post as helpful as I can, I'm going to start out with some key CSS Classes then I'll move into the actual form pattern.
CSS Classes
The following is a listing of the new CSS classes that I've been using and found to be key to working with the new form pattern.
|
CSS Class
|
Purpose
|
|
dnnForm
|
Used on a "div" element to wrap the entire contents of a form.
|
|
dnnFormItem
|
Used on a "div" element to construct an individual item in a form
|
|
dnnClear
|
Used to ensure that floating content has been cleared
|
|
dnnFormRequired
|
Used to indicate with the red indicator bar that a form field is required. Typically used on TextBoxes
|
|
dnnFormError & dnnFormMessage
|
Combined when added to a RequiredFieldValidator or similar control will enusre that the display is shown using the consistent error display that is used on all DNN forms.
|
|
dnnActions
|
Used on a "ul" to hold a listing of buttons for actions within a form
|
|
dnnPrimaryAction
|
Used on a "button" to have it styled as the primary action.
|
|
dnnSecondaryAction
|
Used on a "button" to have it styled as the secondary action, typically just as a link
|
|
dnnFormSectionHead
|
Used on "h2" or similar element to style an item as a section heading
|
Now the above listing is just a subset of the CSS Classes that were added, but these are the basic ones that I needed to get my forms updated to the new standard.
Coding the Form
So, it is all fine and dandy that I have these items defined, but what does it actually take to get the form coded? Actually it is very simple, and I'll break it down into a number of steps for you.
Form Overview
To ensure that we start out on the right foot, lets take a high level look at what a form should look like:
<div class="dnnForm dnnClear">
<ul class="dnnActions dnnClear">
<li><asp:LinkButton id="btnSubmit" runat="server"
CssClass="dnnPrimaryAction" text="Submit" />
</li>
</ul>
</div>
As you can see here it is pretty simple, a div to contain the entire form, then at the bottom an actions list to handle your operations.
Form Items
Once we have the overview of the form created, we can add our items. In the most basic structure items should look like the following.
<div class="dnnFormItem">
<label>My Label</label>
<asp:TextBox id="txtMyTextbox" runat="server" CssClass="dnnFormRequired" />
<asp:RequiredFieldValidator id="myValidator" runat="server"
ControlToValidate="txtMyTextbox" Text="My Error"
CssClass="dnnFormMessage dnnFormError" display="Dynamic" />
</div>
Now, notice here that we have an individual div for each item, within this we have a HTML label and then our control(s). If you are used to using the DotNetNuke Label control for providing localized labels and help information you can substitute that control for the label as used in the above example.
To continue building out your form, simply add additional Form Item Div's as needed within the dnnForm div created above and your will be set to go.
I hope that this basic overview of the general form structure has been helpful. In future posts I will show how to create expanding/collapsing sections using the jQuery helpers

Oktober 10, 2012 07:27 by
Jervis
ASPHostPortal is a premiere web hosting company that specialized in Windows and ASP.NET-based hosting, proudly announces new Microsoft product, Windows Server 2012 hosting to all new and existing customers. The newly released server operating system offers a number of features that can be utilized to benefit developers, resellers and businesses.
Windows Server 2012 offers new and improved features which enable multi-user infrastructure where storage resources, networking and compute are completely remote from other users. There are a number of key features that customers will find useful, including support for asp.net 4.5, Internet Information Services 8.0 (IIS), compatibility with Visual Studio 2012, Visual Studio Express 2012, support for ASP.NET MVC 4, and Entity Framework 5. Other key new features include dynamic IP restriction to help prevent DoS attacks, support WebSockets and node.js, and also CPU Throttling to ensure isolated each client's server usage and Application Initialization to improve user experience of first requests.
“We have always had a great appreciation for the products that Microsoft Offers. With the launched of Windows Server 2012 hosting services, entrepreneurs and organization will be able to build their impressive website to be on the top of the competition.” Said Dean Thomas, Manager at ASPHostPortal. “Within Windows Server 2012 hosting packages, users will have the ability to use Hyper-V in assorted configurations, improved isolation and security, fortified access controls to files and processes and the capability of managing servers as a group.”
ASPHostPortal is one of the Microsoft recommended hosting partner that provide most stable and reliable web hosting platform. With the new launch of Windows Server 2012 into its feature, it will continue to keep ASPHostPortal as one of the front runners in the web hosting market. For more information about new Windows Server 2012 hosting, please visit http://www.asphostportal.com.
About ASPHostPortal.com:
ASPHostPortal.com is a hosting company that best support in Windows and ASP.NET-based hosting. Services include shared hosting, reseller hosting, and sharepoint hosting, with specialty in ASP.NET, SQL Server, and architecting highly scalable solutions. As a leading small to mid-sized business web hosting provider, ASPHostPortal strive to offer the most technologically advanced hosting solutions available to all customers across the world. Security, reliability, and performance are at the core of hosting operations to ensure each site and/or application hosted is highly secured and performs at optimum level.