This project is read-only.
1
Vote

TriggerControlCausedPostback doesnt match on expected control ID or work with blank ID

description

This code does not take account of a blank _triggerControlId or that the returned ctlId has a runtime ID containing placeholder names etc.
        if (!string.IsNullOrEmpty(ctlId))
        {
            if (ctlId == _triggerControlId) 
                return true;
        }
Instead replace with something like
        if (!string.IsNullOrEmpty(ctlId) && !string.IsNullOrEmpty(_triggerControlId))
        {
            if (ctlId.EndsWith("$" + _triggerControlId))
                return true;
        }
Or some better way of matching placeholder id.

comments