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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T03:42:48+00:00 2026-06-06T03:42:48+00:00

I bounded data to dropdownlist but when i click on button i want value

  • 0

I bounded data to dropdownlist but when i
click on button i want value of selected item but i cant get.and also its going refresh.

<script type="text/javascript">
    $(document).ready(function () {
     $.ajax({
      type: "POST",
      async: false,
      contentType: "application/json; charset=utf-8",
      data: "{}",
      url: "Drpodownlistbindingjquery.aspx/getdata",
      dataType: "json",
      success: ajaxSucceess,
      error: ajaxError
     });
     function ajaxSucceess(response){

      $.each(response.d, function (key, value) {
       $("#ddlCategory").append($("<option></option>").val(value.Sname).html(value.Sno));
      });

     }
     function ajaxError(response){
      alert(response.status + ' ' + response.statusText);

     }       

    });
    </script>

And ,my second problem is

<script type="text/javascript">

$(document).ready(function() {
   $("#btnsubmit").click(function(){     

       $.ajax({  

           type: "get",

           url: "loginform.aspx/getdataval",
           data:'{"uname":"'+$("#TextBox1").val()+'","passwod":"'+$("#TextBox2").val()+'"}',
           contentType: "application/json;charset=utf-8",   
           dataType: "json",         
           sucess:function(data){
           var Emp=data.d;
           alert('welcome');
           $("#output").append('<p>'+Emp.Sname+ ' ' + Emp.Sno+'</p>');
            //here i want to give redirect link
            },
            error: function(e) {
                 alert(e);
             }

   });
   });
   });
   </script>

i m comparing username and password but its giving error. anything is wrong here?
Drpodownlistbindingjquery.aspx is not a typo mistake am sure.
Thanks in advance.

  • 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-06T03:42:49+00:00Added an answer on June 6, 2026 at 3:42 am

    Second problem is easy:

    sucess:function(data){
        var Emp=data.d;
    

    sucess should be success.

    And as @nbrooks pointed out:

    url: "Drpodownlistbindingjquery.aspx/getdata"
    

    Drpodown should be Dropdown.

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

Sidebar

Related Questions

in a repeater, i want to do a function on every item bounded, example
This will print data , but I want it to print show . I
I want to make all types that are instances of Enum and Bounded also
I don't see a way to get the maximum capacity of a bounded buffer
I have a data grid which is bounded to a simple List. now i
I have a static list of data called Services . I also have two
Could a bounded stack data structure (a stack with an upper limit) be implemented
I'm attempting to create a scatter plot bounded by histograms of the data to
I want to plot multiple bounded functions in gnuplot. I.e. plot x from 0
I have a textbox and some labels inside the data template of bounded listbox.

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.