TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
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
Forums
Monthly Leaders
Forum guidelines
gaurav kumar
NA
11
4.4k
i want to call webmethod on dropdown item change in asp .net
Jan 22 2015 1:11 AM
i have bind one dropdown list using json ,its work good , but i want to fill value in text box on calling webmethod on changing dropdown item in asp.net
i have write code but its not working so, please post right way
and my code is
here
<script type="text/javascript">
///Get value in
$(document).ready(
$(function () {
$('#<%=DdlBusinessPlan.ClientID%>').change(function () {
var StateID = $("#DdlBusinessPlan > option[@selected]").attr("value");
if (StateID != 0) {
$.ajax({
type: "POST",
url: "PinGeneratemaster.aspx/GetPointValue",
contentType: "application/json; charset=utf-8",
data:'{Id: ' + $('#<%=DdlBusinessPlan.ClientID%>').val() + '}', // { Id: +StateID },
datatype: "json",
success: function (data) {
$("#<%=txtPoint.ClientID %>").html(value .results);
// $("#<%=txtPoint.ClientID %>").val (data.results);
},
error: function (result) {
alert("Error");
}
});
}
});
});
</script>
Reply
Answers (
1
)
HTML Editor V3.5 Hyperlink
Invalid URI: The hostname could not be parsed