Skip to content

Asp.net and sql server

KAMAL ANSARI

Asked Apr 3, 2015, 4:21 AM EDT3 answers
Share
LinkedInX
If I insert rollno in textbox show all subjects marks in different textboxes and should be editable.
 
 Thanks...

3 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • Afzaal Ahmad Zeeshan
    0
    And what have you tried, or what is the schema for table. 


    Sharing these information would help us to guide you any further. 
    0
  • 0
    Asp.net:I have a table in which, 6 textboxes 1st for rollno and others for subject marks, as I fill rollno in 1st textbox other textboxes auto fill with subject marks and save the marks in another table in database.
    0
  • Afzaal Ahmad Zeeshan
    0
    You need to use ajax requests to download data from your database. For example if you're having a TextBox (which will be an input field in HTML) then you can trigger a function to request for data according to the value in TextBox. 


    For example, you can trigger ajax requests, like this...


    $.ajax({
        url: 'server-side-page.aspx',
        data: $('#textBoxId').val()
        success: function (data) {
            // data contains the result from server,
            // append it to the tables or what ever
        }
    });


    You can at the very same time, have this code on the server side to fetch data from database.


    @{
        // initialize and fetch data from database
        // and populate your web page, which would be
        // returned by the ajax request. 
    }


    This way you can download data for the Roll Number that is entered into TextBox. You can learn more about jQuery ajax here.
    0