Txoj kev sai thiab yooj yim: Tau qhov SPFolder ntawm kev SPListItem nyob hauv ib lub Receiver Event

Kuv yuav lees nws ntxub, tab sis kuv struggled nrog no ib txhua hnub. Kuv caij receiver kev hloov ntawm cov niam txiv sis teb. Qhov no tshuav me me qhia tau hais tias yuav ua li cas:

lwm yam khoob lug UpdateParentFolder(SPItemEventProperties khoom)
{

SPFolder thisItemFolder = zog.ListItem.File.ParentFolder;
thisItemFolder.Item["ZZ pom zoo lawv"] = "Xov zoo, sawv daws!";
thisItemFolder.Item.Update();


} // UpdateParentFolder

Qhov no, Kuv tabtom ua hauj lwm nrog rau ib daim ntawv qiv ntawv thiab cov khoom los yog ib qho kev tshwm sim hauv ItemAdded.

Qhov ua kom yuam kev yog tias tsis tau qhov SPFolder ntawm yam khoom no ntawm yam khoom no xwb (i.e. zog.Yog thov ListItem.Folder). Xwb, mus saib daim ntawv teev khoom txoj kab ntaub ntawv thiab muab cov ntaub ntawv ceev.

</kawg>

Subscribe rau kuv blog!

Ntawv cim npe Technorati:

Ib tug xav rau"Txoj kev sai thiab yooj yim: Tau qhov SPFolder ntawm kev SPListItem nyob hauv ib lub Receiver Event

sau ntawv cia

Koj email chaw nyob yuav tsis muab luam tawm. Search cim *