10 TIPs - To Become a Good Developer/Programmer
Why Join
Become a member
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
C# Corner Home
Technologies
Monthly Leaders
ASK A QUESTION
Forum guidelines
Sagar
2k
95
21.2k
dropdown bind from ajax call
Jan 21 2015 5:16 AM
hello plz help me ,
actually m binding a dropdown list using this code
<script type="text/javascript">
$(document).ready(function () {
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: "AddBooks.aspx/BindddlCategory",
data: "{}",
dataType: "json",
success: function (data) {
$.each(data.d, function (key, value) {
$("#ddlCategory").append($("<option></option>").val(value.CategoryId).html(value.Category));
});
},
error: function (result) {
alert("Error");
}
});
});
</script>
also [webmethod] invoking fine but the problem is this dropdown gets populated if my page contains <form runat= "server"> tag
& if m using masterpage & in its content page the dropdown is not populating...
can u tell me y???
Reply
Answers (
1
)
Tree View in gridview Using jquery in asp.net
how to create virtual key board in c# windows application