Dynamicweb 8 Documentation
Create Method (OrderField)
Example 

The field ID. DB field name is OrderFieldID.
Creates the specified OrderField object.
Syntax
'Declaration
 
Public Shared Function Create( _ 
   ByVal fieldId As String _ 
) As OrderField
public static OrderField Create( 
   string fieldId 
)

Parameters

fieldId
The field ID. DB field name is OrderFieldID.
Example
class OrderField_EditPage : System.Web.UI.Page
{
   OrderField orderField;
   protected void Page_Load(object sender, System.EventArgs e)
   {
       OrderField orderField = OrderField.Create( Request("ID"));
   	
   	   if (!Page.IsPostBack)
       {
   		   SystemNameStr.Text = orderField.SystemName;
   		   NameText.Text = orderField.Name;
   		   TemplateNameStr.Text = orderField.TemplateName;
   		   Locked.Checked = orderField.Locked;
 
           System.Collections.SortedList typeList = new System.Collections.SortedList();
           FieldTypeCollection fts  = FieldType.getFieldTypes;
           foreach( FieldType ft in fts )
               typeList(CType(ft.ID, String)) = Translate.JsTranslate(ft.Name);
           gui.CreateDropDown(typeList, TypeStr, orderField.TypeID.ToString, False);
           
           if( orderFieldId != "" ) {
               SystemNameStr.Enabled = false;
               TypeStr.Enabled = false;
           }
   	   }

   }
}
class MyPage : System.Web.UI.Page
{
   public OrderField GetOrderField()
   {
       string orderFieldId = Request["ID"];
       OrderField orderField = OrderField.Create(orderFieldId);
       return orderField;
   }
}
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