开发者

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>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜