From what I have read, if you are exercising for less than an hour, you don't need to replace electrolytes and don't need the sports drinks. Drink water instead.
If you are exercising for more than an hour and sweating a lot, there are a lot of options. You can do the sports drinks or you can eat gels, blocks or beans. There are also electolyte tablets (salt tablets) that you can take with water.
Personally, I do half-marathons, marathons and triathlons that last anywhere from 3 to 6 hours. What I have found is that when I am thirsty, I want water. However, if I don't do any food or electrolyte replacement, I will get crampy and my stomach will feel sloshy like the water isn't going anywhere. I eat and take electrolyte tablets as well. That enables me to finish the races.