So heres a conceptual question that I can't really find in any books. Is it possible to programmatically write to 2 different lists a the same time. I mean I think it is, but my code is not working which means it's probably a syntax error, if it's possible.
By the description of your question I guess your talking about creating multiple lists using a single feature, if that's right then yes you can have multiple list definitions associated to a single feature but I wouldn't going to recommend this as it can lead to development issues in future. but still if you want to go it then here's a simple example, Your Feature file will look like this,
In above feature code I declared three elementmanifest with location to a element file, element.xml contains a definition for a feature element. Now you can declare a elementfileA with a tag for ListTemplate,
you can create two more element files with respected names as you declared them in feature.xml, for the above listTemplate, make sure you create a new folder with same name as listtemplate e.g. in this case you will have three folders named as elementfileB, elementfileA or elementfileC with each list's schema.xml in them. For more information on this you can look at this MSDN article However if you want to add multiple lists using code then you can try something like this,
For more information on creating a list using check this Link out I am no master so if you see any mistake let me know,
|
|||||
|
Please provide more information about effect you want to achieve, because I'm not sure if I understand you correctly. Theoretically, it should be possible to write / update any number of lists at the same time, using for example parallel threads. You can simplify this as - threads as users. So, when 2 users can edit 2 different lists at the same time, why wouldn't it work on 2 threads? Just make sure you called BTW. You can have as many as list you want in one feature. |
|||
|
foreach
operation writing the same item to each list one immediately after the other be acceptable? – Robert Kaucher Nov 10 '12 at 2:49