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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T22:10:09+00:00 2026-06-09T22:10:09+00:00

I am working on a ASP.net application, where i need to select a value

  • 0

I am working on a ASP.net application, where i need to select a value in aspx file from the following code:

<td align="right"> Signal </td>
    <td> <select id = "signal" name = "signal">
    <%
        SqlDataReader Dr = Signal(); 
        while (Dr.Read())
        {
            Response.Write("<option> " + Dr["SignalID"].ToString() + " </option>");
        }
        Dr.Close();
    %>
        </select>
    </td>

    <td align = "right"> Data </td>
    <td> <input type="textarea" id = "data"/> Data need on the basis of above selected data </td>

Where Signal() method is returning the some data. For example it returns :

2005, 2006, 2007

Raw code of the above data are:

<select>
 <option value="2005">Volvo</option>
 <option value="2006">Saab</option>
 <option value="2007">Mercedes</option>
</select>

But what i am facing a problem, is that i want this selected variable back to same aspx.cs file without submitting the form. So that i can show the data into the text area.

For example:

User open the some.aspx page, then a form will occur on the page. By default it shows 2005 and on the basis of that info text area will load.

When user will select 2006, and on the basis of that data text area loaded dynamically.

I know that we can do with the Ajax and Jquery, but i am not good enough to work with the Jquery and Ajax.

  • 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-09T22:10:10+00:00Added an answer on June 9, 2026 at 10:10 pm

    Solution 1: Use the DynamicPopulate control from the Microsoft AJAX Toolkit – very easy to implement

    Solution 2: Use jQuery AJAX API as you’ve pointed out.

    Either solution will require a WebMethod.

    [System.Web.Services.WebMethod(BufferResponse=false)]
    public string GetTextAreaData(int selectedIndex)
    {
       //implementation code
    }
    

    Solution 1 is rediculously simple, I won’t even post an example. Just following the link above and you should be all set. But I will say this, read up on performance tweaks related to the ToolkitScriptManager, like setting it to release mode, combining scripts, etc..

    The second solution is pretty easy too, but requires you to parse the results yourself (sort of). jQuery has come a long way from prior years and it’s not as scarey anymore.

    Create an OnChange event handler (JS method) and attach it to your drop down list. Within the handler, call something like this: (note, this is untested code and it may not work with a simple copy/paste, but you get the idea).

    function GetTextAreaData() { 
        var data = this.selectedIndex; // or whatever you want to send to the server
        var options = { 
            type: "POST", 
            url: "Default.aspx/GetTextAreaData", 
            data: "{selectedIndex:" + data + "}", 
            contentType: "application/json; charset=utf-8", 
            dataType: "json", 
            success: function(msg) { 
                $('#textAreaId').val(msg);
            } 
        }; 
        $.ajax(options); 
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on ASP.net Webform application where i need to block certain dates
I'm working in ASP.NET c# application. I came to a part where I need
I am working on asp.net application and I have generated entity model (edmx) from
I am working on a ASP.NET application. I want to prevent the user from
I'm working on multilingual Asp.NET MVC application. In url i need to use category
I am working on asp.net web application in which i need to show the
I am working on web application .net 3.5,asp.net,C#. In that i need to provide
I am working on an ASP.NET MVC application where I need to export data
I'm working on an asp.net application which uses Lucene.net I need to highlight the
I am working in an ASP.Net application and need to get the ID of

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.