hello,
i have LinkButton1 inside listview - and listview bind with database. each row has categoryname categoryid
- take label value of categoryid which is inside the listview and assign it to query string - show a popup
here is the script
<script type="text/javascript">
$(function () {
$('[id*=LinkButton1]').on('click', function () {
var id = $(this).closest('div[class="list whitebg"]').find('[id*=Label12]').html();
var oldURL = window.location.protocol + "//" + window.location.host + window.location.pathname;
var newUrl = oldURL + "?Id=" + id;
if (window.history != 'undefined' && window.history.pushState != 'undefined') {
window.history.pushState({ path: newUrl }, '', newUrl);
$('#myModal').modal('show');
$("#<%=HiddenField1.ClientID %>").val(id);
}
return false;
});
});
</script>
<asp:HiddenField ID="HiddenField1" runat="server" />
inside popup i have linkbutton2 and on click of linkbutton i call webmethod like this
<script type="text/javascript">
$(function () {
$("[id*=LinkButton2]").bind("click", function () {
//check query string parameter
//assign values to webmethod
var biddescription = $("[id*=TextBox1]").val();
var bidamount = $("[id*=TextBox2]").val();
var status = 'Active';
var username = '<%=@HttpContext.Current.User.Identity.Name%>';
var projectid = $("[id*=HiddenField1]").val();
var noofdays = $("[id*=TextBox3]").val();
if (Page_ClientValidate("sendproposal")) {
$.ajax({
type: "POST",
url: "allrequest.aspx/insertbid",
data: "{username: '" + username + "', projectid: '" + projectid + "', biddescription: '" + biddescription + "', bidamount: '" + bidamount + "' , status: '" + status + "', noofdays:'" + noofdays + "'}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (response) {
//alert(response.responseText);
$("[id*=TextBox1]").val("");
$("[id*=TextBox2]").val("");
$("[id*=TextBox3]").val("");
$('#myModal').modal('hide');
$('#spnCharLeft').css('display', 'none');
$('#spnCharLeft2').css('display', 'none');
$('#lblTick').text('');
$('#lblTick2').text('✔ Perfect');
},
error: function (response) { alert(response.responseText); },
failure: function (response) { alert(response.responseText); }
});
return false;
}
});
});
</script>
what i want is on success function of webmethod i want to disable linkbutton1 which is insider listview where labelid is equal to querystring value
please advice