aDEFWEBSERVER
Los Angeles, CA *
 Webmaster@ADefWebserver.com

Back to: Creating a DotNetNuke® Module using LINQ to SQL For absolute beginners! Part 2

The Application Look and Feel

  • Format the dollar amount properly.

  • Validate that a description has been entered.

 

 
   

Format the dollar amount properly

 

Open the Website in Visual Web Developer Express 2008 (or Visual Studio 2008) by selecting File then Open Web Site.



Navigate to the root of the DotNetNuke site and click Open.

Double-click on the View.ascx file (located at ...\DesktopModules\LinqThings4Sale\View.ascx) to open it.


When the page opens in the editor window, switch to Design view and click on the options (right-arrow on the right side of the control) next to the GridView to open the GridView Tasks.

Click on the Edit Columns... link.

 


Click on Price in the Selected fields section then enter {0:c} for the DataFormatString in the BoundField properties section and click OK:

 

Validate that a description has been entered.

 
   

Click on the options (right-arrow on the right side of the control) next to the FormView to open the FormView Tasks.

Click on the Edit Templates link.

Click on the options (right-arrow on the right side of the control) to open the FormView Tasks again and select InsertItemTemplate from the Display drop-down.


In the ToolBox, select the RequiredFieldValidator control.


Drag and drop it below the Description box.


Switch to Source view. This will allow you to highlight the control and enable the properties for the control to show up in the Properties box.


In the Properties box, select DescriptionTextBox from the ControlToValidate drop-down.


Also in the Properties box, enter "Description is required." for ErrorMessage.

   
Save the page.  
   

Back to: Creating a DotNetNuke® Module using LINQ to SQL For absolute beginners! Part 2

(C) by Michael Washington - ADefWebserver.com - Webmaster@ADefWebserver.com

DotNetNuke® is a registered trademark of the DotNetNuke Corporation