ETIQUETTES OF GOING TO TOILET
If you wish to offer a prayer and need to go to toilet, you may begin with the latter. There are many reported etiquettes of going to toilet. However, I will hereinafter mention some of them briefly:
You may precede your left foot to the right when entering the water closet (or the place where you excrete) and say the following:

.
When you try to take off, you may utter the BISMILLAH
At such a situation, and all similar situations, you must try to cover your private parts, letting nobody see them. It is haram (i.e. religiously unlawful) to sit, for excretion, facing the kiblah direction or giving it one’s back.
While excreting, it is recommended to say the following:

If your sight falls on the excrement, you may say the following:

When you finish and want to clean yourself, you may first of all try to make sure that you have discharged the entire waste. Then, you may say the supplicatory prayer that is said when one’s eye falls on water:

While cleaning yourself from the waste, you may say the following:

When you finish and stand up, you may rub your abdomen with your right hand and say the following:

You may then leave the water closet (or the place where you have excreted), preceding your right foot to the left and saying the following:

.