Dynamicweb 8 Documentation
Lock Method (OrderField)
Example 

Locks this instance.
Syntax
'Declaration
 
Public Sub Lock() 
public void Lock()
Example
class MyPage : System.Web.UI.Page
{
   public OrderFieldCollection GetOrderFields()
   {
       if (HttpContext.Current.Application["Ecom:OrderFields"] == null)
       {
           OrderFieldCollection ofc = OrderField.getOrderFields();
           foreach (OrderField of in ofc)
           {
               of.Lock();
           }
           HttpContext.Current.Application.Lock();
           HttpContext.Current.Application.Set("Ecom:OrderFields", ofc);
           HttpContext.Current.Application.UnLock();
           return ofc;
       }
       else
       {
           return (OrderFieldCollection)HttpContext.Current.Application["Ecom:OrderFields"];
       }
   }
}
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

OrderField Class
OrderField Members

Send Feedback