Tell me more ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

If I add a element to list:

                protected void Button2_Click(object sender, EventArgs e)
            {
                using (SPWeb witryna = SPContext.Current.Web)
                {
                    SPListItemCollection listItems = witryna.Lists["Szczegoly"].Items;

                    SPListItem item = listItems.Add();
                    item["Kontrakt"] = TextBox1.Text;
                    item["Pracownik"] = TextBox2.Text;
                    item["Dzien"] = TextBox3.Text;
                    SPFieldLookupValue splkup = new SPFieldLookupValue(5,TextBox4.Text);
                    item["Procenty"] = splkup;
                    item.Update();
                }
            }

A lookup fields adding in item called "Procenty" a "3/8" percent value

I', getting only 3/8 value not 5/8. How o get get a IDis in this function?

share|improve this question
I done it thanks to Per Jakobsen !! :) sharepoint.stackexchange.com/questions/37681/… – Grzegorz Z Oct 29 '12 at 14:06

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.