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 6598369
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:20:16+00:00 2026-05-25T18:20:16+00:00

Simple question. I have the following hidden input field on my ASP.NET page: <form

  • 0

Simple question. I have the following hidden input field on my ASP.NET page:

<form id="userform" method="post" action="RankingPage.aspx">
    <input type="hidden" id="email" />
    <input type="hidden" id="name" />
</form>

I’m trying to get the data from the field (in my code behind) like this:

protected void Page_Load(object sender, EventArgs e)
{
    string name = Request.Form["name"].ToString();
}

It’s returning a null reference (which I’m assuming means it couldn’t find the field). Am I doing this wrong?

  • 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-25T18:20:17+00:00Added an answer on May 25, 2026 at 6:20 pm

    oh geee, i was struggeling with this myself today.

    I wanted to use the hidden html field to store info inbetween partial postbacks from my update panels.

    I didn’t want to use the ‘runat =”server” ‘ on my hidden field as this then screws the ID (because i’m using masterpages).

    the moment i changed mine from

    <input type="hidden" id="manageremailHidden" />
    

    to

    <input type="hidden" id="manageremailHidden" name="manageremailHidden"/>
    

    i was able to call the read the value from codebehind (on postback)

    Public ReadOnly Property manageremailknown() As String
        Get
            Return Request.Form("manageremailHidden")
        End Get
    End Property
    

    cut a long story short.. you need to add the name property as well, otherwise it won’t work.

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

Sidebar

Related Questions

Simple question. I have the following HTML: <a rel=nofollow id=claim-job-link data-method=post class=button green claim-job
Simple question: I have the following markup... <a href='#'> <img src='icon.png'> This is the
simple question :- i have the following simple if (..) statements :- if (foo
A little stuck here. I have a simple question I guess. Given the following
Simple regex question. I have a string on the following format: this is a
Fairly simple question: I have an init method on my class that has the
Very simple question: suppose I have the following js/jquery code doSomething(); $.get(url, callback); doSomethingElse();
a simple question for all you SQL gurus: I have the following table structures
I have a multi-step data entry form in my ASP.NET MVC application. When the
I'm hoping this is a simple question - I have the following helper code:

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.