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. Through
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 detailsearch, which I add to the htmlgenericcontrol.
But in the normal-search mode I set the visibility of the
htmlgenericcontrol = false. 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 unitl the
detailsearch is visible. The reason is the lifecycle of the page, because
page_load comes for linkbutton-event. And this is why I have to fire the
linkbutton event twice. How can I solve this problem, that the detailsearch
becomes visible by the first linkbutton event?
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. Through
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 detailsearch, which I add to the htmlgenericcontrol.
But in the normal-search mode I set the visibility of the
htmlgenericcontrol = false. 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 unitl the
detailsearch is visible. The reason is the lifecycle of the page, because
page_load comes for linkbutton-event. And this is why I have to fire the
linkbutton event twice. How can I solve this problem, that the detailsearch
becomes visible by the first linkbutton event?
Thanks for any help!