I have a dropdownlist with autopostback and an update panel, it works correctly, but I have also other controls in my page with autopostback. What I need is to control when the page is autopostback but the dropdownlist is not autopostback do something, like this:
If is not Page.autopostback then
'do something
else if is not MyDropdownlist.autopostback then
' do something different
End if
I can use this:
If is not Page.autopostback then
End If
But I can´t do this:
If is not MyDropdownlist.autopostback then
End If
So how can I do this? I hope my explanation has been helpful, thanks.
The
__EVENTTARGETrequest form variable has the name of control that caused postback to happen. You can query the name of this control and do whatever you want to do.For example,