ASP. NET Ajax Control Toolkit: modalpopupextender usage tips

Source: Internet
Author: User
ASP. NET Ajax Control Toolkit: modalpopupextender usage tips)

1. You can use

  • Client (JavaScript): $ find ('[modelpopup. clientid]'). Hide ();/show ();
  • Code behind: [modelpopup]. Hide ()/. Show ();

2. if you want to use more than one show/hide button, you can use the (1) method to convert the onclientclick parameter JavaScript of the button. You can also use the common control (such as textbox) use [textbox]. attributes. add ("onclick", "$ find ('" + [modelpopup. clientid] + "'). show ();")

3. If you want to disable pop-up after pop-up quit and press "ESC" quit, you can skip this test.HereAndHere. However, if there is more than one modalpopup in the same region, or if I change modalpopup to webcontrol as I do, this method will be useless. My current solution is:

  • Add [panel] to the Panel for pop-up. attributes. add ("onkeydown", "If (event. keycode = sys. UI. key. ESC) {$ find ('"+ [modelpopup. clientid] + "'). hide (); Return false ;}");
  • Add $ get ('"+ [any control in panel] +"'). Focus () on any control that triggers modelpopup show ();

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.