Ondrasek started his career in the South-Bohemian side České Budějovice in 2007, doing a short loan-spell at FC Zenit Čáslav in 2009. Upon returning to Dynamo, he delivered a decent season, becoming the top scorer for the club during the 2010–11 Gambrinus liga. The following season he was seen as the key pillar of the team, scoring eight league goals in twenty rounds. The last two matches he was injured due to a fractured finger. His good performance was drew the attention of foreign clubs. Upon his transfer to Tromsø in 2012, the manager of Dynamo Jiří Kotrba noted that if the sale went through it would be an historic event, as it was the first time in history that Dynamo had sold a player directly abroad.
Ondrášek joined the Norwegian side Tromsø IL on a loan in March 2012. He made an immediate impact on the club. In the league opener, Ondrášek came in off the bench for his debut and, despite heavy snow, scored the only goal in a 1-0 win against Fredrikstad FK. His starting debut came a week later April 4 during an away draw against Aalesunds FK. He continued playing well and contributed a total of 8 goals in 14 matches before Tromsø IL decided to make the move permanent and signed him to a contract that will see him stay at the club until 2015. The season proved to be a great success for the Czech striker, seeing him score 14 goals and becoming the Top-scorer in the league that season. This was just two goals short of his pre-season pledge of 16.