asp.net - link button click depends on text property -


i need click on link button "view old" display list of old items , change text of link "view active". works, changes text , displays old list items . if click on same link button new text "view active", doesn't work , stays same. second "if" statement doesn't executed. how can make work , force using same link button? new it. thank if can enter image description here

protected void lknbtnoldwwus_click(object sender, eventargs e) {     if (lknbtnoldwwus.text == "| •view old wwu's |")     {         lstbxwwulist.items.clear();         lists list = new lists(request.islocal);         lknbtnoldwwus.text = "| •view active wwu's |";         foreach (listitem item in list.wwu((int)session["usertable.companyid"], true))         {             lstbxwwulist.items.add(item);         }     }     if (lknbtnoldwwus.text == "| •view active wwu's |")     {         lstbxwwulist.items.clear();         lists list = new lists(request.islocal);         lknbtnoldwwus.text = "| •view old wwu's |";         foreach (listitem item in list.wwu((int)session["usertable.companyid"], false))         {             lstbxwwulist.items.add(item);         }     } 


Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -