• Login

Snippets

25

                    ListItem lisource = ddlDonationSource.Items.FindByValue(item.Source);
                    if (lisource != null)
                    {
                        // value found - select it
                        ddlDonationSource.SelectedValue = item.Source;
                    }
                    else
                    {
                        //Value not found - add it and then select it
                        ddlDonationSource.Items.Insert(1, new ListItem(item.Source, item.Source));
                        ddlDonationSource.SelectedValue = item.Source;
                    }

Post Rating

Comments

There are currently no comments, be the first to post one!

Post Comment

Name (required)

Email (required)

Website