Wednesday, August 28, 2013

AutoComplete Extender Example in Asp.Net

In this tutorial I will explain how to use Auto Complete Extender Example in Asp.Net.It will work like Google Search box, when you start typing it will search words from database according to prefix of word you typed in text box.

We can use Ajax auto complete extender to any text box to implement this and after assign auto complete extender to text box and type more content than the specified minimum word length, a popup will show words or phrases starting with that value. Here we are implementing auto complete extender to fetch data from the database through a Web service.

Here Auto Complete Extender’s Design View and Web service Code:





Tuesday, August 27, 2013

How to add/Remove column in Asp.net Repeater controller


Adding Repeater controlled in “.aspx” page. And its look like below images.


·      Now add code behind logic in .CS file. I already use appropriate comment. So it’s very easy to understand and Implement.   
After adding this logic in your Code behind file and Run the application. Output is look like..


.......That's it...Happy Coding..... 

Bundling in Asp .net 2010


Adding Bundling in Simple .net Web Forms

Create a new ASP.NET Web Forms application which targets the .Net 2.0 framework.
Now add  "System.Web.Optimization.dll" reference in Visual studio.

Now Adding Scripts and CSS file reference in page with some HTML.


Then Run the application launch the Mozilla F-12 developer tools. Select the Script tab or CSS tab, and then use the assets button to view the all JavaScript or CSS files.




You can select one of the JavaScript or CSS files and view it in the left pane. Note the full (non-minimized version) of the files are used.

Creating the JavaScript and CSS Bundles


Adding JavaScript and CSS file to the BundleConfig class in the App_Start folder. The following code shows the complete BundleConfig class:


Register the Bundles

The templates create the code hook up the bundle registration in the Application_Start method in the Global.asax” file.




After adding BundleConfig class in the App_Start folder, Solution structure is look like below image.


Reference the Bundles in web form


Add the JavaScript and CSS bundles to the head markup as shown in the following code:

Now run the application launch the Mozilla F-12 developer tools. Select the Script tab or CSS tab, and then use the assets button to view the JavaScript or CSS files. You can see only one JavaScript and CSS files are there and it’s fully minimized version.