Thanks for your responses. I can't paste code here, but I works for other use's cases. My method tell me if my form in current page is on error. And in this case I need to add the word "Error" in title of this page. I hope it's more clear now.
So the second why proposed by Taha is not useful in this case. Thanks,