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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:57:49+00:00 2026-06-13T12:57:49+00:00

I have saved input (text,checkbox,dropdownlist) in one html page, and am loading that in

  • 0

I have saved input (text,checkbox,dropdownlist) in one html page, and am loading that in asp:panel, after loading users can enter values in that. Now by Clicking Asp:button i have to find that input types and save to database, how can it achieved.

the input code will be in this format .

<label style="left: 46px; top: 73px; position: relative;" id="Llb1" onmouseup="MLup(this.id)" class="ui-draggable" onmousedown="MLdown(this.id)"> Enter the value </label>
<input style="left: 170px; top: 113px; position: relative;" id="T1" onmouseup="mUp(this.id)" class="ui-draggable"  onmousedown="mDown(this.id)" value="" type="text">

This input types i have to find those ids, and text… how can it possible..

  • 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-13T12:57:50+00:00Added an answer on June 13, 2026 at 12:57 pm

    Here i got a solution for finding the id of text,select, labels through html Button click

     <input type="button" id="save" value="submit" onclick="submitpage()" />
    

    then on submitpage

    <script type="text/javascript">
              function submitpage() {
                  var completeids = new Array();
                  var completevalues = new Array();
                  var completetype = new Array();
                  var completeselected = new Array();
                  var labelvalues = new Array();
                 // var name = "abc";
                  var name = document.getElementById('<%=username.ClientID %>').innerHTML
                  $('input[type="text"]').each(function () {
                      completeids.push($(this).attr('id'));
                      completetype.push('TEXTBOX');
                      completevalues.push($(this).attr('value'));
                      completeselected.push('no');
    
                  });
                  $('label').each(function () {
                      completeids.push($(this).attr('id'));
                      completevalues.push($('label[id= ' + $(this).attr('id') + ']').html());
                      labelvalues.push($('label[id= ' + $(this).attr('id') + ']').html());
                      completetype.push('LABEL');
                      completeselected.push('no');
    
                  });
                  $('select').each(function () {
                      completeids.push($(this).attr('id'));
                      completevalues.push($(this).val());
                      completetype.push('DROPDOWN');
                      completeselected.push('no');
    
                  });
                  $('input[type="checkbox"]').each(function () {
                      completeids.push($(this).attr('id'));
                      completevalues.push($('label[for=' + $(this).attr('id') + ']').html());
                      completetype.push('CHECKBOX');
                      completeselected.push($(this).attr('checked'));
    
                  });
                  $('input[type="radio"]').each(function () {
                      completeids.push($(this).attr('id'));
                      completevalues.push($('label[for=' + $(this).attr('id') + ']').html());
                      completetype.push('RADIOBUTTON');
                      completeselected.push($(this).attr('checked'));
    
                  });
                  $('input[type="file"]').each(function () {
                      completeids.push($(this).attr('id'));
                      //completevalues.push('not yet done');
                      completevalues.push($(this).attr('value'));
    
                      completetype.push('FILE');
                      completeselected.push('no');
    
                  });
    
                  var loc = window.location.href;
                  $.ajax({
                      type: 'POST',
                      url: loc + "/GetSaved",
                      data: "{getcompleteids :'" + completeids + "',getcompletevalues :'" + completevalues + "',getcompletetypes :'" + completetype + "',getcompleteselected :'" + completeselected + "',getlabelvalue :'" + labelvalues + "',formname:'"+name+"'}",
                      contentType: "application/json; charset=utf-8"
    
                  })
                .success(function (response) {
                    alert(response.d);
    
                })
                .error(function (response) {
                    alert(response.d);
                });
    
              }
    
        </script>
    

    at c# code i have used like this…

     [WebMethod]
        public static string GetSaved(string getcompleteids, string getcompletevalues, string getcompletetypes, string getcompleteselected, string getlabelvalue, string formname)
        {
    
            string[] completeids = getcompleteids.Split(',');
            string[] completevalues = getcompletevalues.Split(',');
            string[] completetypes = getcompletetypes.Split(',');
            string[] completeselected = getcompleteselected.Split(',');
            string[] labelvalues = getlabelvalue.Split(',');
             SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["dynamic"].ConnectionString);
            string FORMNAME = labelvalues[0];
            for (int i = 0; i <= completeids.Length-1; i++)
            {
                con.Open();
                                                                                            //FORM_NAME,     USER_NAME         ,CONTRO_TYPE,             CONTROL_ID,        CONTROL_VALUE,                CONTROL_SELECTED
                SqlCommand cmd = new SqlCommand("INSERT INTO CONTROLS_INFORMATION VALUES('" + FORMNAME + "',' "+formname+" ','" + completetypes[i] + "','" + completeids[i] + "','" + completevalues[i] + "','" + completeselected[i] + "')", con);
                cmd.ExecuteNonQuery();
                con.Close();
            }
    
    
    
            return "successfully";
    
        }
    

    It was done..
    Hope it will be useful to some one like me..hmm…

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

Sidebar

Related Questions

I have saved an html page using the following line of code : NSURL
I have a form that includes several input text fields and a list that's
I have a template that displays the list of items. It has one checkbox
serializeArray() does not pick up form fields that have been added after page load
I have following html: <label for=live>Live</label> <input type=checkbox name=live id=live /> How to save
I have saved input from a textarea element to a TEXT column in MySQL.
If have a html form like <form method=POST action=http://.../file.php> <input type=text name=data id=data />
so I have a form that I have multiple input text fields as well
I have saved an image path in database like so: C:\Users\3embed\Documents\Visual Studio 2010\Projects\HeritageWeb\HeritageWeb\Images\startbutton.png I
I have a kmz file that I have saved as kml to use in

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.