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

I have a DropDownList I must have to refresh all site page to add a element to them from propeties in Event Receiver AddingItem.

How Can I refresh the page locally or maybe with in a Update Panel?

I inserted a Update panel, but it is doesn't work, and only refresh page help to update DropDownList by new element:

The code of DropDownList adding:

        protected void Page_Load(object sender, EventArgs e)
        {
        SPWeb witryna = SPContext.Current.Web;
        SPListItemCollection listaDniNaProjektDropDownList = witryna.Lists["Szczegoly"].Items;
            int index;

            // Początek IsPostBack

            if (!IsPostBack)
            {
                DropDownList1.Items.Add("<-- Wszystcy pracownicy -->");

                foreach (SPListItem oListaDniUrlopu in listaDniNaProjektDropDownList)
                {

                    // Dodawanie do DropDownList1 kolejnych obiektów listy

                    index = oListaDniUrlopu["Pracownik"].ToString().IndexOf("#");
                    DropDownList1.Items.Add((oListaDniUrlopu["Pracownik"].ToString().Substring(index + 1)));
                }
share|improve this question

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.