Top Ad unit 728 × 90

recent

How To Use Pop Up Control In Asp.Net Using Ajax

pop-up-control-asp-.net-asp.net-C#-use-ajax-how-to-example
In this tutorial we will learn how to use pop up control in asp.net by using ajax controls. I have mentioned all the steps for using pop up control in asp.net, you can easily understan how to use these controls by following these simple steps. So lets starts.






Some Important Points ::

Make sure that you have installed Ajax Toolkit into your Toolbox. If not you can download Ajax Toolkit from this link Download Ajax Controls Toolkit and install it to your toolbox.

For installing Ajax Toolkit see this tutorial ::
How To Install Ajax Control Toolkit in Visual Studio.


Way to use Pop Up Control ::


Step 1 ::


The very first step is to take a Script Manager or a Tool Script Manager

Goto Tool Box > Ajax Control Toolkit Tab > ToolScriptManager

pop-up-control-asp-.net-asp.net-C#-use-ajax-how-to-example


Step 2 ::


After taking the ToolScriptManager take a panel from standard tools tab

Goto Toolbox > Standard Tools > Panel

pop-up-control-asp-.net-asp.net-C#-use-ajax-how-to-example


Step 3 ::


Now take a table into the panel and write some text ("Hello this is popup example") and take two buttons inside the panel' table and change their name as OK and Cancel buttons.

Goto Toolbox > Standard Tools > Button

pop-up-control-asp-.net-asp.net-C#-use-ajax-how-to-example


Step 3 ::


Now take a third Button outside the Panel and change its text and id according to you. Make sure it is outside the panel.

Goto Toolbox > Standard Tools > Button

pop-up-control-asp-.net-asp.net-C#-use-ajax-how-to-example


Step 4 ::


Now goto the smart menu of third button in my case Show Popup button and click on the ad extender link you will see a popup window will open. Select Modal Popup Extender from that window and click on OK button.

pop-up-control-asp-.net-asp.net-C#-use-ajax-how-to-example

pop-up-control-asp-.net-asp.net-C#-use-ajax-how-to-example


Step 4 ::


After adding the extender to the third button go to the properties of third button, here you can find a tab ShowButton_ModalPopupExtender(in my case) explore that tab. In this there are mainle three main things- 

  1. PopupControlID - put the id of your Panel
  2. OkControlID - put the id of OKButton
  3. CancelControlID - put the id of CancelButon
pop-up-control-asp-.net-asp.net-C#-use-ajax-how-to-example


after that close the property tab.


Step 5 ::


Now generate the click event of "Show Popup Button"(in my case) just simply double click on that button
and a single line code.
{
      ShowButton_ModalPopupExtender.Show();
}

and you have to write a single line code on to the Page Load Event also
{
      ShowButton_ModalPopupExtender.Hide();
}

pop-up-control-asp-.net-asp.net-C#-use-ajax-how-to-example

now save all the things.


Step 6 ::


now goto .aspx page and take a view pf that page into tha browser..
when it opened in browser click on Show Popup button and a pop will open..

pop-up-control-asp-.net-asp.net-C#-use-ajax-how-to-example


Thank you fof giving you time. If you have any problem in this comment it..

How To Use Pop Up Control In Asp.Net Using Ajax Reviewed by Team tt24 on 12:00 AM Rating: 5

No comments:

All Rights Reserved by Ask To Chimp © 2014 - 2015
Powered By Blogger, Designed by Sweetheme

Contact Form

Name

Email *

Message *

Powered by Blogger.