4

I currently have a problem with my website in ASP.net / C#. I'm building a page, where a couple of elements are dependent on others. On this page I use some import css classes, though they seem to get lost, whenever a Postback happens. Could anyone take a look at the code and tell me where it goes wrong?

I used a .NET fiddle file to paste the code of my .ascx and .ascx.cs file. I hope it's somewhat clear. Apologies if it's not.

https://dotnetfiddle.net/NLwtiN

EDIT: I tried to compare the html of 2 DropDownLists, hoping there'd be some significant difference, though there is next to none

image

kukkuz
  • 41,512
  • 6
  • 59
  • 95
  • A user whose [question](http://stackoverflow.com/questions/25238057/saving-textbox-text-into-xml-file/25239273#25239273) I just answered told me that if (!Page.IsPostBack) did not work for him, however if (Page.IsPostBack == false) worked. Maybe you can try it out, just in case. – Shahid M Zubair Aug 11 '14 at 13:41
  • mhm I tried that, but there's no difference. The css still doesn't load after the PB, but thanks anyway. – I_Am_Not_user3185054 Aug 11 '14 at 13:50
  • Is the only "selected" attribute on the ` – alex May 22 '15 at 16:11

0 Answers0