I have a dropdownlist and when I selected a value from it I am checking the value from another table and according to returning value I change the visibility of a layout item. Now I need to set it Required if it is visible(If the value from ajax is 3 or 5). How can I do it? Here is my ajax that set visible or not.
Edit: I want to set liGid required when in if condition.
`$.ajax({
type: "POST",
url: "TestPage.aspx/GetCode",
data: '{"XKod":"' + s.GetValue().toString() + '"}',
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (msg) {
if (msg.d.GrupKodu == 3 || msg.d.GrupKodu == 5) {
fytbTab0.GetItemByName('liGid').SetVisible(true);
}
else {
fytbTab0.GetItemByName('liGid').SetVisible(false);
}
}
});`