3 Replies - 106 Views - Last Post: 09 August 2019 - 08:34 AM Rate Topic: -----

#1 DarenR   User is offline

  • D.I.C Lover

Reputation: 624
  • View blog
  • Posts: 4,170
  • Joined: 12-January 10

how would i keep a selected item even on dropdownlist rebuild?

Posted 09 August 2019 - 06:13 AM

so i have drop down lists that are directly dependent on other drop down lists.
they want me to add an edit button by date
so when the date changes the shift drop down list must repopulate with that day of week shift id which is used to populate an hours drop downlist

the question is how can i keep the selected index of that drop down list on rebuild because the value will change but the index is generally the same?
Is This A Good Question/Topic? 0
  • +

Replies To: how would i keep a selected item even on dropdownlist rebuild?

#2 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 15171
  • View blog
  • Posts: 60,720
  • Joined: 12-June 08

Re: how would i keep a selected item even on dropdownlist rebuild?

Posted 09 August 2019 - 06:54 AM

Is this a full loop from client to server to client?
Was This Post Helpful? 0
  • +
  • -

#3 DarenR   User is offline

  • D.I.C Lover

Reputation: 624
  • View blog
  • Posts: 4,170
  • Joined: 12-January 10

Re: how would i keep a selected item even on dropdownlist rebuild?

Posted 09 August 2019 - 08:28 AM

oh man this portal posts back like a mofo because off all the requirements..
i circumvented it by putting it in a session
Was This Post Helpful? 0
  • +
  • -

#4 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 15171
  • View blog
  • Posts: 60,720
  • Joined: 12-June 08

Re: how would i keep a selected item even on dropdownlist rebuild?

Posted 09 August 2019 - 08:34 AM

Then yeah.. session variables or the ever so fancy 'viewstate'.

https://www.c-sharpc...s-in-Asp-Net53/

.. or save to a database.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1