Showing posts with label ajax toolkit. Show all posts
Showing posts with label ajax toolkit. Show all posts

Friday, September 12, 2014

Ajax Control toolkit ModalPopUp in ASP.NET C#

Here I am going to show how to create a modal pop up using AJAX control toolkit in ASP.NET and C#. Before I have show how to create a pop up using JQuery and CSS, but now its pure asp. For this you need to add AJAX Control toolkit into your project. You can download as per your version of .NET (3.5,4.0,4.5).
After downloading create a project and add the reference of the AJAX Control Toolkit into your project.

Now your visual studio is ready to begin with AJAX Control Toolkit. Add a new Web Form. In the tool Box you will get the control ModalPopupExtender within AJAX Control Toolkit.

Lets first see how to set a ModalPopup to show any message. Check the following code.


AJAX Modal Popup

Here is the content which you wan to show

Run this example and on the button click you will get a pop up showing in your browser.

Lets move to an example where you will get an message showing with data from back end. Add another page and check following code.


In the CS page write down the following code.
protected void btnClick_Click(object sender, EventArgs e)
{
 /* get data from DB */
 lblusername.Text = TextBox1.Text;
 this.ModalPopupExtender1.Show();
}

Output :
Direct Message showing

Message from code behind


I hope its clear how to create popup and how to show message or show message from code behind. For further download the full source code here.

Wednesday, March 5, 2014

AJAX Control Toolkit in ASP.NET

AJAX stands for Anonymous Javascript and XML. It helps to send data to server without refreshing the page. In visual studio it has given some predefine AJAX controls like Script Manager, Script Manager Proxy, Update Panel, Timer, Update Progress. But apart from all these there are many other tools of AJAX to use and make the application much more flexible. Such as is AJAX Toolkit. You can download this from here. And to day I will show you how to add this toolkit into your visual studio.

First download the toolkit from here. And then find the AjaxControlToolkit.dll from that folder. You an download as per your framework, like for visual studio download AJAX Toolkit 4.0 and for Visual studio

Wednesday, January 15, 2014

Make Your Own Gravatar using C# in ASP.NET

Now a days its a style to use Gravatar (Globally Recognized Avatar) as default profile pictures in various websites. You can assign this gravatar in ASP.NET using AJAX Toolkit but if you are looking for the gravatar using your name or something other text then the following example is the best one for you.

Here I will show you how to convert a text into an image using C# in ASP.NET. For this we need to take class Graphics and to generate the bitmap we need class Bitmap.

So lets start.

First take a text box to take input the text from user and add a button to convert it into image

Popular Posts

Pageviews