Retreive Data from Custom Field Type in listFieldIterator? RRS feed

  • Question

  • Hi All,

           I have a custom field type(Signature) which has a UI with UserName and Password and Label which return signature or exception.

          I have situation to use listfielditerator control where only Signature need to show. until this part fine. everything works.

         i need to update some more fields based on the successful validation of member. Problem starts here on ListfieldIterator.Update is returning void.  i would like to capture all the fields of signature like username and password and exception etc.,

        I would appreciate if anybody can send sample code or point me in right direction.

    Thanks in advance.

    Friday, October 5, 2012 7:26 PM


  • Hi Tech,

    I think you can use Event Receiver to get all the fields of signature like username and password and exception etc. When you want to update an item based on some validation, you can create an ItemUpdating Event Receiver and get all of the page posted data(will include the username and so on) and validate the datas. Here is a sample code about how to get page data in ItemUpdating Event:
    public class MyEventHandler: SPItemEventReceiver
    private HttpContext current;
    public MyEventHandler() : base()
       current = HttpContext.Current;
    public override void ItemUpdating(SPItemEventProperties properties)
       var data1=current.Request.Form[controlname];
    If the validation is failure, you can stop the update operation. Here is a link about this:

    Lhan Han

    • Edited by Lhan Han Friday, October 12, 2012 10:44 AM
    • Proposed as answer by Aviw_ Friday, October 19, 2012 11:54 AM
    • Marked as answer by Lhan Han Sunday, October 21, 2012 2:11 PM
    Friday, October 12, 2012 10:44 AM