(I asked a similar question, but decided to repost it with clearer wording.)
I have a SP 2010 list for which I have created a NewForm.aspx form using SharePoint Designer. I have discovered (the hard way) that you cannot add code directly to the NewForm.aspx page.
But, if I want to do things such as conditionally change the filtering for queries used to populate dropdown menus on the form, what is the best way to go about this? I thought the answer was to create a code-behind page, but I'm seeing people say that isn't the SharePoint way. Okay, so what is the SharePoint way to go about this? How do I go about hitting this NewForm.aspx nail with a C# hammer?
I am not looking for a "use jQuery on the client side" answer, and here's why: One of the tasks I'm trying to accomplish is to intelligently filter a query list before it is ever delivered to the client. Why? So I can avoid populating an HTML select menu with 700 options, only to strip away 695 of them with jQuery.
I really am looking for how do I go about using C# to work on NewForm.aspx.