Laws are silent on certain matters, because in the natural course of things, such things as resignation do not happen. Apart from the Party spending a lot of money on elections, candidates also purchase party ticket at a very high price. If they get elected it is a gold mine. Bankrupt fellows become crorepatis in the 5 years. If they are elected on a ruling party ticket, they will be in heaven. They will hang on to the post at any cost. Generally the problem is they do not resign when they should. See how much humiliation Dr. Manmohan Singh has suffered? Does he resign still? Resignation is often used as a threat. A group of MP's or MLA's hand over their resignation letters to their faction leader and say he will use his discretion to submit it to the speaker. They do not expect their leader to do that. They believe their threat will work.
Actually more devastating is withdrawing support to a minority Government and precipitating a full General Election.