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

  • SEARCH
  • Home
  • 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 8220919
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T13:43:09+00:00 2026-06-07T13:43:09+00:00

I have document.form1.submit() in javascript. I want to know how it’s received in code

  • 0

I have document.form1.submit() in javascript. I want to know how it’s received in code behind. In which class, in which method? Something like that. Coz I want to get the value inside a textbox to store it in session. And do i need an actual “submit” button for this to work? This really confuses me.

If i put it like this:

function CallSubmit() {
                var thetext = document.getElementById('textbox1').value;
                document.form1.submit(thetext);
            }

will I be able to pass the value of textbox1 to a specific method in code behind if it has, like, a receiving variable? I mean, how do i get the value of textbox1?

By the way, I’m trying to do this before the page unloads. Because I need to store the text from textbox1 so that I can re-assign that value back after the page refreshes.

  • 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-06-07T13:43:12+00:00Added an answer on June 7, 2026 at 1:43 pm

    You can get the post back values on code behind using the ‘Form’ as

    Request.Form["textbox1"]
    

    and if you read this Request.Form you get all data from post

    Comments.
    In asp.net we general avoid to use direct the Request.Form and we use asp.net controls that all ready handle the post values.

    For example if you use an asp:TextBox with ID=textBox1 then you read the post from textBox1.Text
    and if you like to read it using the Request.Form you need to call the Request.Form[textBox1.UniqueID]

    The textBox1.UniqueID is the name value on the html control, and the name used for the post back.

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

Sidebar

Related Questions

Hello i have this form filling javascript: function onLine(code,nn) { document.writeform.bericht.value+=code; document.writeform.bericht.focus(); document.writeform.nickname.value+=nn; write1();
I have the following simple javascript code, which handles the Return Key, I don't
I have a form which I want to submit, so when I click on
i have html form i am using <a href="#" onclick="document.aa.submit()"> instead of submit button
function abc() { document.form1.1.disabled=true; } I have a select box whose id is 1
function focus(element) { document.form.element.focus(); } I want to have a function to focus on
I want to submit a form and add a javascript variable with it. I
I have a form which collects a persons address. When they click submit I
i have this html and javascript program code for log in window. my html
I have a few radiobuttons in a jsp page. I run a javascript method

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.