Skip to main content
added 418 characters in body
Source Link
Revenant_01
  • 169
  • 1
  • 5
  • 19

i have A list and B document library . in the A list i have attachment field and once user adds an attachment it should go to the B document library . how can i do that . and i want to do it in my event receiver .

using (SPSite SPSite = new SPSite(Convert.ToString(ConfigurationManager.AppSettings["siteURL"])))
                  {
                      using (SPWeb SPWeb= SPSite.OpenWeb())
                      {

                          SPListItem ITPCItem = ITPCWeb.Lists[properties.ListId].GetItemById(properties.ListItem.ID);}}}

this way i am getting the SPList Item.

enter code here

i have A list and B document library . in the A list i have attachment field and once user adds an attachment it should go to the B document library . how can i do that . and i want to do it in my event receiver .

i have A list and B document library . in the A list i have attachment field and once user adds an attachment it should go to the B document library . how can i do that . and i want to do it in my event receiver .

using (SPSite SPSite = new SPSite(Convert.ToString(ConfigurationManager.AppSettings["siteURL"])))
                  {
                      using (SPWeb SPWeb= SPSite.OpenWeb())
                      {

                          SPListItem ITPCItem = ITPCWeb.Lists[properties.ListId].GetItemById(properties.ListItem.ID);}}}

this way i am getting the SPList Item.

enter code here
Source Link
Revenant_01
  • 169
  • 1
  • 5
  • 19

update the attachment in the document library programatically

i have A list and B document library . in the A list i have attachment field and once user adds an attachment it should go to the B document library . how can i do that . and i want to do it in my event receiver .