Hi,

I have a drop-down list that is used to select a theme (which can only be set in the Page_PreInit event) and so I set a session object called theme that I use to set the theme in the PreInit event. The problem is that on the postback, the PreInit event occurs before the drop-down list is even created and thus before the list's SelectedIndexChanged event that I'm using to set the Session variable. The only thing I can think of doing is somehow doing a second postback so that the page loads again with the new theme setting. A call for this second postback would be in the SelectedIndexChanged event, but I don't know how to refresh the page like that using code.

So basically, how do you refresh/postback the page in code?

Figured it out myself >_<
I just needed a Response.Redirect(); to redirect the browser to the same page

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.