Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

In SPD 2010, on designer surface of a web part page I insert DataFormWebPart by:
"Current Data Source" ("Data Sources Details" Task Pane) --> choose rows --> "Insert Selected Fields As.." --> "New Item Form"). One of the fields has the markup code:

<SharePoint:FormField   
   runat="server" 
   id="ff1{$Pos}"  
   ControlMode="New"  
   FieldName="PID_NonLookup"
   __designer:bind="{ddwrt:DataBind  
      (
        'i',  
        concat('ff1',$Pos),  
       'Value', 
       'ValueChanged',  
        'ID',   
         ddwrt:EscapeDelims(string(@ID)),  
        '@PID_NonLookup')}" 
    />

Then converted this element to ASP.NET Label control enter image description here

and then I set Text property to parameter ParamNewForm defined in my form as {$ParamNewForm}

enter image description here

getting it in corresponding markup code of field element:

<ASP:Label   
   runat="server" 
   id="ff1{$Pos}"  
   Text="{$ParamNewForm}"
   __designer:bind="{ddwrt:DataBind  
      (
        'i',  
        concat('ff1',$Pos),  
       'Value', 
       'ValueChanged',  
        'ID',   
         ddwrt:EscapeDelims(string(@ID)),  
        '@PID_NonLookup')}" 
    />

This all work fine.
But I'd like to understand a few things in order to further customize my form.

Why in code the ID is parametrized as:

id="ff7{$Pos}"

while in "Tag Properties" pane it is plain ff7_new ?

Can you give me examples how this ID, already having a fixed value ff7_new in "Tag Properties" pane and dynamic one in code (id="ff7{$Pos}"), can mutate and be anything different from ff7_new in Sharepoint control (or form)?

What are the implications of substituting id="ff7{$Pos}" by id="ff7_new" in original Sharepoint FormField code and in ASP.NET control?

To be continued...

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.