The Duke of York says there needs to be a "culture of enterprise" to help young people turn technology ideas into commercial products.
This meant cultivating the type of problem-solving skills not in the national curriculum, he said.
Prince Andrew was speaking at an awards ceremony for young innovators.
Young people should "recognise that science and technology are the basis of how we are going to be prosperous in the future," said the duke.
The Duke Of York, presenting this year's TeenTech awards, spoke of the importance of digital industries and encouraging young people to put their technology ideas into practice.
He suggested they would need skills such as coding - and that the idea that he would most have wanted to come up with himself was the internet.
"At some stage young people are going to come into contact with coding or the need to code. We have to find ways of doing it. There isn't a right way or a wrong way.
"Every school and everyone who wants to code will have to find their own way of doing it. It's horses for courses. It's the local solution that needs to be found, because if you can solve local problems, you'll solve the national ones.
"There's no point trying to come up with an all-encompassing plan. The digital universe is expanding at an exponential rate."
Prince Andrew, who also said he was involved in a digital education project with musician will.i.am, said that developing ideas involved such non-exam subjects as "leadership, teamwork and adaptability".
"You can't put everything in the national curriculum. We have to create an enterprising culture, where education is conducted in a culture of enterprise, where young people are encouraged to understand they can rather than they can't."
The competition, developed by science television presenter Maggie Philbin and backed by Stephen Fry and James May, aims to encourage teenagers to get involved in inventing and designing.
It is an attempt to bridge the skills gap, with a report from Ms Philbin, saying the UK economy needs to recruit an extra 745,000 workers for the digital economy.
The winning secondary school pupils, collecting their awards in Buckingham Palace, had come up with ideas that could be developed as commercial products.
Pupils from Birkdale School in Sheffield designed a vacuum system which would help cars have more grip, based on a road suction system once used on racing cars.
Sarah Griffin from Loreto Grammar School in Altrincham had developed a tracking system to monitor the location of people suffering from dementia.
Pupils from the same school had worked with Childline to develop an app to monitor "happiness and well-being".
Richard Lander School in Cornwall designed a playground from recycled materials, and swings that could generate power.
The awards are designed to encourage interest in the so-called STEM subjects - science, technology, engineering and maths, and have been supported by industrial partners such as Google, Airbus and Network Rail.
Next year will see one of the winners getting their product made and put on sale by the technology and gadget shop, Maplins.
Prince Andrew said the number of girls winning the competition showed that the question of women being excluded was no longer relevant.
"It's plain as anything, there are no barriers to women working in a digital universe. None whatsoever. There may have been in the past, that boys took up computer programming at an earlier stage."
The modernity of the technology under discussion was in contrast to the the gilt and grandeur of the palace.
The room where the awards were presented was redesigned in 1853. In that year, cutting-edge designs meant the opening of the first pillar box and Isambard Kingdom Brunel accepted the commission to build the biggest ship in the world, the SS Great Eastern.
Prince Andrew said the challenge for teachers was to "encourage young people to recognise that they have it in them to be successful". But they also had to realise "we can't all be Steve Jobs".