Click here to Skip to main content
15,890,741 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Was this course material is effective Dropdownlist1 (Poor)
was this course practical is effective Dropdownlist2 (poor)


When user select the poor from the dropdownlist1 the pop screen will open.
popup screen as follows.


Negativ_Feedback

textbox
Submit (Button)

in the above textbox user types the reason and click the submit button.i want to save the record as follows in database.

Table structure as follows
Type reason

in database i want to save the dropdownlist name and comments.


I want the output as follows in table.

Type reason
Dropdownlist1 the course material is not effective one.
Posted

Hello,

Create a web service and call it using AJAX to save the record. You can refer to below CP article's to know more about creating web services in C#

As far as AJAX call is concerned it can be easily done using JQuery library, the following code snippet depicts a typical AJAX call done using JQuery. It uses POST and sends data as application/x-www-form-urlencoded.
JavaScript
$.ajax({
    url:your_service_url,
    type: 'POST',
    data: {"type":"TYPE", "reason":"REASON TEXT"},
    complete: function(XMLHttpRequest, textStatus) {
        if ("error" == textStatus)
            alert("Unable to complete your request!");
    },
    success: function(data, txtStatus, jqXHR) {
        // YOUR CODE GOES HERE
    } 
});

Regards,
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900