title: Sharepoint Webpart posting data to Application Page via PostBackUrl
body: <p>I have a Webpart that contains a couple of dropdowns on an update panel. There is a submit button that has the PostBackUrl set to a sharepoint Application Page</p>
  
  <pre><code>&lt;asp:DropDownList ID="ClassSelector" runat="server" Enabled="False" 
      AutoPostBack="True" onselectedindexchanged="ClassSelector_SelectedIndexChanged"&gt;
      &lt;asp:ListItem Selected="True" Value="-null-"&gt;Select Class...&lt;/asp:ListItem&gt;
      &lt;asp:ListItem Value="1"&gt;Class 1&lt;/asp:ListItem&gt;
  &lt;/asp:DropDownList&gt;
  &lt;asp:Button ID="btnSubmit" runat="server" Text="Show Page" Enabled="False" 
                  PostBackUrl="~/_layouts/MyWebParts/MyAppPage.aspx" /&gt;
  </code></pre>
  
  <p>This works in redirecting the browser to the Application Page I have created, but I am having trouble accessing the form data.</p>
  
  <p>On the Page_Load function of the Application Page I have the following debugging code.</p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e)
  {
      Label1.Text = "";
  
      foreach (String s in Page.Request.Form.AllKeys)
      {
          Label1.Text += s + ": " + Page.Request.Form[s] + "&lt;br /&gt;";
      }
  
  }
  </code></pre>
  
  <p>This shows that the data I need has in fact been posted to the page.</p>
  
  <pre><code>ctl00$m$g_24a73cf8_8190_4ddb_b38b_bf523b12dbd3$ctl00$SemesterSelector: 28
  ctl00$m$g_24a73cf8_8190_4ddb_b38b_bf523b12dbd3$ctl00$ClassSelector: 11-0021-A
  </code></pre>
  
  <p>But when I try to access this as:</p>
  
  <pre><code>Page.Request.Form["ClassSelector"]
  </code></pre>
  
  <p>Nothing is returned. I know I must be missing something simple here, but I am not sure what.</p>
  
  <p>Any help is greatly appreciated.</p>