In an answer to a post, I read "If you like my answer you can upvote and accept it..". I am just wondering if we can do things like that.
I'm going to throw in my $2$ cents here.
I think it's acceptable to ask a user to accept or vote up and answer if
- They have shown some gratitude but not voted (like what Lord_Farin said)
- If they are a new user and you don't think they are aware of accepting or upvoting an answer
- If the question has had no upvotes or accepted answers and the OP has indicated somehow that an answer has worked. (linked to $1$)
New users, I believe, sometimes don't know they can accept an answer or upvote it (if they have enough rep). As a matter of fact, they might even know what "accept" is. So, informing them of how to upvote or pick an answer they liked is not wrong, in my opinion. This also helps us decrease the amount of "unanswered questions" that have actually been answered satisfactorily and therefore, increases the amount of questions that have been answered. To make sure you are informing them and not just nudging them to choose your answer, you can leave a neutral comment like
If you liked this answer or any of the other answers provided by the other users then you can click the check mark beside the answer to "accept" it. If you have 15 rep or above, then you can even upvote an answer to show gratitude; you can upvote multiple answers. This will help the user and yourself.
In general, it is nice to increase the percentage of questions with accepted answers. So, if a question has one or more answers that seem to fully answer the question, particularly if the asker is new to the site (low rep), it is fine to leave a polite comment to the effect of "Is there another aspect of the question that needs to be addressed? If not, you are able to 'accept' your preferred answer by clicking the check mark beside it."
However, that comment should be made politely. Wait for several days, or longer, to make sure the asker has a chance to look at the answers, and don't badger or harass them. Just a short, polite comment will do - the asker can act on it, or ignore it, as they see fit.
It should not be necessary to put this into the answer itself. It goes without saying that any good answer can be accepted. The comments/notification system is a better way to contact the asker later if they don't accept any answer.