Hi ,
I have created user ontrols (.ascx), now calling those user controls on Ajax Tab control.
Now , I have added some validation using jquery. Now it here everything works fine. When I add Ajax Update panel for avoiding page flikker, Javascript on usercontrol , does not gets executed. .Please find below code for the same
.ajax__tab_xp .ajax__tab_tab {
height: 21px;
min-height:21px;
}
<%--
<%--
<%--
This is Tab2
Please help.
Saravanan VPosted Jun 12, 2017, 3:11 PM
I have also faced this kind of script issue on use of update panel in web forms project.
The attached script doesn't fire after the page postback.
The workaround is to rebind the script for the asp.net control.
$(document).ready(function () {
$("#txtUserName").blur(function () {
var userName = $("#txtUserName").val();
if (userName != "")
ValidateUserAccount(userName);
});
});
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
function EndRequestHandler(sender, args) {
if (args.get_error() == undefined) {
var userName = $("#txtUserName").val();
if (userName != "")
ValidateUserAccount(userName);
});
}
}
The above jquery script is available in a custom .js file and referenced in the .aspx page.
Similary way, you can try for user control related scripts.
Please mark my answer as accepted if it fulfils your question.
Sundaram SubramanianPosted Jun 12, 2017, 1:12 AM