Custom Ajax Extender - Collection Property
I have written a custom ajax extender for use with ASP panels and JQuery dialogs. The problem I face is that I need multiple buttons to trigger the dialog, therefore attributes aren't really a viable option. I am hoping to do something like the following:
<ex:DialogExtender TargetID="pnlSomePanel">
<triggers>
<button ID="btnOne">
<开发者_JS百科button ID="btnTwo">
</triggers>
</ex:DialogExtender>
Does anyone know how I can add this custom "triggers" collection into my extender? Thanks.
In your extender, you add a property like the following:
private List<Button> triggers;
public List<Button> Triggers
{
get { return triggers; }
set { triggers = value; }
}
And you will be able to use it like this:
<ex:DialogExtender TargetID="pnlSomePanel">
<Triggers>
<asp:Button ID="btnOne">
<asp:Button ID="btnTwo">
</Triggers>
</ex:DialogExtender>
精彩评论