How not to use Request.Form(index)… Bad, Microsoft, Bad!

I am following a course on web development on the .NET platform, and I wanted to study the Themes functionality. I had problems getting it to work, so I searched Google and found an article from Microsoft with a not so best practice way of getting form information… 

Most of the article is great, but the author of the article tells us to get the information of the selected theme from Request.Form. That is fine – but he tells us to get index number 5 of the Form array. How can you be sure, that your Form variable always is on index number 5? C’on Microsoft… 

http://msdn.microsoft.com/en-us/library/ms366514(v=vs.90).aspx

Lad mig høre hvad du synes, skriv en kommentar: