Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6537253
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:35:41+00:00 2026-05-25T10:35:41+00:00

I have a Webpart that contains a couple of dropdowns on an update panel.

  • 0

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

<asp:DropDownList ID="ClassSelector" runat="server" Enabled="False" 
    AutoPostBack="True" onselectedindexchanged="ClassSelector_SelectedIndexChanged">
    <asp:ListItem Selected="True" Value="-null-">Select Class...</asp:ListItem>
    <asp:ListItem Value="1">Class 1</asp:ListItem>
</asp:DropDownList>
<asp:Button ID="btnSubmit" runat="server" Text="Show Page" Enabled="False" 
                PostBackUrl="~/_layouts/MyWebParts/MyAppPage.aspx" />

This works in redirecting the browser to the Application Page I have created, but I am having trouble accessing the form data.

On the Page_Load function of the Application Page I have the following debugging 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] + "<br />";
    }

}

This shows that the data I need has in fact been posted to the page.

ctl00$m$g_24a73cf8_8190_4ddb_b38b_bf523b12dbd3$ctl00$SemesterSelector: 28
ctl00$m$g_24a73cf8_8190_4ddb_b38b_bf523b12dbd3$ctl00$ClassSelector: 11-0021-A

But when I try to access this as:

Page.Request.Form["ClassSelector"]

Nothing is returned. I know I must be missing something simple here, but I am not sure what.

Any help is greatly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T10:35:42+00:00Added an answer on May 25, 2026 at 10:35 am

    Ah, the ASP.NET master page prefix problem! One of my favorites.

    The master page for your application page puts a prefix in front of your server-side controls so that they will be unique. If you end up access your control via the Form collection, you have to access it using not only the control ID, but also the ContentPlaceholder prefix. That’s why you see such a large ID dumped out of your debugging logic.

    If you want to programmatically get to the ID of the control, you can use FindControl, but you’ll have to target the apppropriate content placeholder scope for this. Here’s a good tutorial/explanation here (which really emphasizes how complex this can get!).

    Of course, the other option you can use is just hard-coding the control id based on what you’re seeing from your debugging code…but that won’t be reliable if you change content placeholders or more your control to a different container.

    I guess the answer depends on how static your controls will be.

    Hope this helps. Good luck!!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a sharepoint webpart that will exist on many pages. The webpart has
I am facing a very strange issue. I have a SharePoint webpart that displays
I have developed a web part that has to be deployed on a Sharepoint
Folks, I have a custom WebPart (the ASP.Net variety) that has a property whose
I have a user control inside a webpart inside sharepoint that I add some
I have a sharepoint webpart that shows some information from some lists, the lists
I have created an employee spotlight webpart on our SharePoint site that randomly selects
If have a standard aspx page (non-sharepoint) that hosts webparts It contains one asp:catalogzone
I have a page in SharePoint that contains both a local and global content.
We have a webpart that has 2 user controls. We want the second user

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.