lifecycle problem

  • Thread starter thomas via DotNetMonster.com
  • Start date
T

thomas via DotNetMonster.com

I’am programming a portal with a user-search. The normal usersearch is
through the nickname (textbox), which works fine. I also programmed a
detail-usersearch, which give the portal-user the opportunity to search by
more parameters (gender, age, region etc), which works also fine. I the
normal mode I just wanna have the textbox with the nickname-search. Throug
a linkbutton I wanna extend the normal search with the detailsearch. In the
linkbutton-event I set a viewstate[“isDetailSearchVisible”] = “true”. And I
check in the page_load method this viewstate. I always create in the
page_load methode the detailuser-stuff, which I add at the
HtmlGenericControl, but set visible= false in the normal mode. if viewstate
[“isDetailSearchVisible”] == “true” in the page_load methode i set the
visibility of the HtmlGenericControl = “true”. This works fine and the
detailsearch extend the normal-search. The only proplem is, that I have to
fire the linkbutton-event twice, because the page_load methode runs before
the linkbutton-event (lifecycle) and don’t see the viewstate in the first
event. And that is the reason why I have to fire the link-button event
twice, to see the detail-usersearch! How can I solve this problem, that
only one event-fire is necessary?

thanks for any help
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top