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
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