Search This Blog

Monday, February 13, 2012

Concated the two Sharepoint Lists Using Event handlers




public override void ItemAdding(SPItemEventProperties properties)
        {
            SPListItem sp = properties.ListItem;
            String strg = (String)sp["Order Num"];
            String strng = (String)sp["Order Date"];
            sp["Order Name"] = strg + strng;

         }

or


 public override void ItemAdding(SPItemEventProperties properties)
        {
            if (properties.ListTitle == "orders")
            {
                string str;
                str = properties.AfterProperties["order_x0020_no"].ToString();
                str = str + properties.AfterProperties["order_x0020_date"];
                properties.AfterProperties["ordename"] = str;
            }
       }

No comments:

Post a Comment