Wednesday, 26 February 2014



Description:-

            In this example we explain that how to move or transfer focus from one textbox to another textbox in asp.net using javascript.

This is simply process same as we enter the license key when installing any software or install windows xp or any other version of the windows.


In this example when you enter number in first textbox it will automatically move or focus to the second textbox after 4 character.same as when enter number in second textbox it will automatically move or transfer focus to the third textbox after 4 character entering in textbox and same as further textbox and so on.

We all know that all software provide serial key or license key facility.This is real time problem when I was craete a setup in which I want to add this type of facility like automatically move to next textbox after every four character.


To show Example How to insert,update,delete in DataList control clikck here  CRUD operation in DataList 

 How to Bind Excelsheet Data to Gridview CRUD operation in Excelsheet Database

How to Display Layer on one Another in CSS Overlapping Layer in CSS

How to Move to next textbox in asp.net using javascript



Description:-

            In this example we explain that how to move or transfer focus from one textbox to another textbox in asp.net using javascript.

This is simply process same as we enter the license key when installing any software or install windows xp or any other version of the windows.


In this example when you enter number in first textbox it will automatically move or focus to the second textbox after 4 character.same as when enter number in second textbox it will automatically move or transfer focus to the third textbox after 4 character entering in textbox and same as further textbox and so on.

We all know that all software provide serial key or license key facility.This is real time problem when I was craete a setup in which I want to add this type of facility like automatically move to next textbox after every four character.


To show Example How to insert,update,delete in DataList control clikck here  CRUD operation in DataList 

 How to Bind Excelsheet Data to Gridview CRUD operation in Excelsheet Database

How to Display Layer on one Another in CSS Overlapping Layer in CSS

Thursday, 20 February 2014


Description:-
         in this example we explain that how to bind directory and subdirectory or file in TreeView control or display Directory Structure in asp.net.
I had the need for a web-application that could  use TreeView control in order to present a Directory folder and file structure similar to Windows Explorer.

Here I was Defined the First Root Directory and create a TreeNode and in which we will bind the all subdirectory of the Root directory.

if you have to display All Files in Hierchy of the Directory then you have to put another Foreach Loop for the GetFiles like

 System.IO.FileInfo[] Files = directory.GetFiles();

for (int FileCount = 0; FileCount < Files.Length; FileCount++)
{

DirNode.ChildNodes.Add(new TreeNode(Files[FileCount].Name));


you can also add and remove Directory dynamically in Treeview based Hierchy. we can also provide a checkboxes with each and every TreeNode so user can easily navigate to the particular directory and perfomed a operation like Add or Remove Directory under the particular root Directory.

to sorting data in gridview with up and down arrow sorting data in gridview in asp.net


change the background of gridview row when mouse is hover changebackground color of gridview in asp.net

Dynamically bind directory and subdirectory with treeview in asp.net


Description:-
         in this example we explain that how to bind directory and subdirectory or file in TreeView control or display Directory Structure in asp.net.
I had the need for a web-application that could  use TreeView control in order to present a Directory folder and file structure similar to Windows Explorer.

Here I was Defined the First Root Directory and create a TreeNode and in which we will bind the all subdirectory of the Root directory.

if you have to display All Files in Hierchy of the Directory then you have to put another Foreach Loop for the GetFiles like

 System.IO.FileInfo[] Files = directory.GetFiles();

for (int FileCount = 0; FileCount < Files.Length; FileCount++)
{

DirNode.ChildNodes.Add(new TreeNode(Files[FileCount].Name));


you can also add and remove Directory dynamically in Treeview based Hierchy. we can also provide a checkboxes with each and every TreeNode so user can easily navigate to the particular directory and perfomed a operation like Add or Remove Directory under the particular root Directory.

to sorting data in gridview with up and down arrow sorting data in gridview in asp.net


change the background of gridview row when mouse is hover changebackground color of gridview in asp.net

Friday, 7 February 2014


Description:-


 In this example, i will explain that  how to search place, city in a map using Google map in ASP.NET.now days When you are see  all the website or any other web contacts address are attached with map of the city with it’s proper address in the Google map. the Google has been provided a incredible map service to find the any palce, address, zipcode, state,city through the external web application. So we will implement a web application like find the address with Google map in asp.net.

Here we simply use the following link to display your location in Google map like



and then we simply atteched the city and state location append to the above link like
StringBuilder queryAddress = new StringBuilder();
            queryAddress.Append("http://maps.google.com/maps?q=");

       

            if (txtCity.Text != string.Empty)
            {
                city = txtCity.Text.Replace(' ', '+');
                queryAddress.Append(city + ',' + '+');
            }

            if (txtState.Text != string.Empty)
            {
                state = txtState.Text.Replace(' ', '+');
                queryAddress.Append(state + ',' + '+');
            }

            if (txtZipCode.Text != string.Empty)
            {
                zip = txtZipCode.Text.ToString();
                queryAddress.Append(zip);
            }
            url = queryAddress.ToString();
            Response.Redirect(url, false);

And finally we will redirect the page to the url that we are created.

upload image in database using Image datatype upload image in database having datatype is image

extract or convert unzip files to zip folder extract unzip files to zip file in asp.net

bind Accordion panel with dynamic data bind ajax accordion panel with dynamic data

How to Search a Place in Map using Google Map API in Asp.Net


Description:-


 In this example, i will explain that  how to search place, city in a map using Google map in ASP.NET.now days When you are see  all the website or any other web contacts address are attached with map of the city with it’s proper address in the Google map. the Google has been provided a incredible map service to find the any palce, address, zipcode, state,city through the external web application. So we will implement a web application like find the address with Google map in asp.net.

Here we simply use the following link to display your location in Google map like



and then we simply atteched the city and state location append to the above link like
StringBuilder queryAddress = new StringBuilder();
            queryAddress.Append("http://maps.google.com/maps?q=");

       

            if (txtCity.Text != string.Empty)
            {
                city = txtCity.Text.Replace(' ', '+');
                queryAddress.Append(city + ',' + '+');
            }

            if (txtState.Text != string.Empty)
            {
                state = txtState.Text.Replace(' ', '+');
                queryAddress.Append(state + ',' + '+');
            }

            if (txtZipCode.Text != string.Empty)
            {
                zip = txtZipCode.Text.ToString();
                queryAddress.Append(zip);
            }
            url = queryAddress.ToString();
            Response.Redirect(url, false);

And finally we will redirect the page to the url that we are created.

upload image in database using Image datatype upload image in database having datatype is image

extract or convert unzip files to zip folder extract unzip files to zip file in asp.net

bind Accordion panel with dynamic data bind ajax accordion panel with dynamic data

Thursday, 6 February 2014




Description:-

            In this example we explain that how to perform Asynchronous delete operation using Ajax in MVC4.

With the AJAX approach, the user clicks a “delete” link and is then presented with a JavaScript confirmation.  If the user confirms, an asynchronous call is sent to a controller action to handle the delete.  When the controller action completes, a callback is made to a JavaScript function which updates the UI by removing the deleted row from the HTML table.  It sounds pretty fancy but MVC makes it quite simple.  I should be clear, what I’m doing here isn’t clever and certainly is not unique.  I originally got the idea for this off some other blog a few years back.  I’d love to give that person credit but I’ve long since lost the link.  Mostly I’m just posting this here as a reference for myself since it seems my need to do this sort of thing comes up infrequently enough that whenever I do need to do it, I’ve since forgotten how.

The first thing we need to do is reference the jquery.unobtrusive-ajax.js and the jQuery core scripts in our view, or their minified cousins.  This is required for the AJAX link we’ll setup next.

In the project I created for this post, I’m using the MVCContrib grid, just for ease of use when it comes to laying out a model in a table.  I’m also using Twitter Bootstrap, mostly because it’s my most recent obsession and I really like how easy it is to use it to style a web app.  Bootstrap is doing nothing more than styling the table, it’s not performing any functional role in this example.  The code for the view ends up looking like this:

Check File type before upload Upload only word and image file in asp.net

how to upload image in database have a datatype is Image upload image with image datatype

How to create or generate Captcha code in asp.net captcha code same like Google in asp.net

to download complete example click below download image link
download here!

Using AJAX to Perform Asynchronous Deletes in MVC 4




Description:-

            In this example we explain that how to perform Asynchronous delete operation using Ajax in MVC4.

With the AJAX approach, the user clicks a “delete” link and is then presented with a JavaScript confirmation.  If the user confirms, an asynchronous call is sent to a controller action to handle the delete.  When the controller action completes, a callback is made to a JavaScript function which updates the UI by removing the deleted row from the HTML table.  It sounds pretty fancy but MVC makes it quite simple.  I should be clear, what I’m doing here isn’t clever and certainly is not unique.  I originally got the idea for this off some other blog a few years back.  I’d love to give that person credit but I’ve long since lost the link.  Mostly I’m just posting this here as a reference for myself since it seems my need to do this sort of thing comes up infrequently enough that whenever I do need to do it, I’ve since forgotten how.

The first thing we need to do is reference the jquery.unobtrusive-ajax.js and the jQuery core scripts in our view, or their minified cousins.  This is required for the AJAX link we’ll setup next.

In the project I created for this post, I’m using the MVCContrib grid, just for ease of use when it comes to laying out a model in a table.  I’m also using Twitter Bootstrap, mostly because it’s my most recent obsession and I really like how easy it is to use it to style a web app.  Bootstrap is doing nothing more than styling the table, it’s not performing any functional role in this example.  The code for the view ends up looking like this:

Check File type before upload Upload only word and image file in asp.net

how to upload image in database have a datatype is Image upload image with image datatype

How to create or generate Captcha code in asp.net captcha code same like Google in asp.net

to download complete example click below download image link
download here!
This entry was posted in :

Wednesday, 5 February 2014





Description:-

            In previous example we already explain that how to restrict the size of file when uploaded by user through fileupload control Restrict size of file upload in asp.net.but now in this example we explain that how to get the size of file or image size before uploading to the server using jquery in asp.net. 

File uploading functionality is generally used by the every developers to  uploading file on the server.but knowing file size before uploading is a good thing because  we can restrict the end user to upload large size files on the server since we have limited space on the server.

.Net provides both facility to  check uploaded file size on server side as well client side. In this example we explain that  how to  get size of file or image size before uploading on client side using JQuery.




Here is a Jquery code to define the size limit of the uploaded file before uploading to the server.

$("#<%=upload1.ClientID %>").fileUpload({
                'uploader': 'scripts/uploader.swf',
                'cancelImg': 'cancel.png',
                'buttonText': 'Select Files',
                'script': 'Handler.ashx',
                'folder': 'images',
                'fileDesc': 'Image Files',
                'fileExt': '*.jpg;*.jpeg;*.gif;*.png',
                'multi': true,
                'auto': true,
                'sizeLimit': (100 * 1024), //200 KB
                onError: function (a, b, c, d) {
                    if (d.type === "File Size") {
                        $("#lblmsg").html('File Size Should not exceed 100 KB');
                    }
                },
                onComplete: function () {
                    $("#lblmsg").html('');
                }
            });

Look at this above code in which we predefined the size of file is 100 KB. So if user upload the larger file then 100 kb then Appropriate message will be displayed to the user.

 MVC Registration Form with client and server side validation Validation in Registration Form in MVC4

Upload multiple file with progressbar Uploading multiple file at a time with progressbar



Check File Size before Upload or Get Image Size before Upload using jQuery





Description:-

            In previous example we already explain that how to restrict the size of file when uploaded by user through fileupload control Restrict size of file upload in asp.net.but now in this example we explain that how to get the size of file or image size before uploading to the server using jquery in asp.net. 

File uploading functionality is generally used by the every developers to  uploading file on the server.but knowing file size before uploading is a good thing because  we can restrict the end user to upload large size files on the server since we have limited space on the server.

.Net provides both facility to  check uploaded file size on server side as well client side. In this example we explain that  how to  get size of file or image size before uploading on client side using JQuery.




Here is a Jquery code to define the size limit of the uploaded file before uploading to the server.

$("#<%=upload1.ClientID %>").fileUpload({
                'uploader': 'scripts/uploader.swf',
                'cancelImg': 'cancel.png',
                'buttonText': 'Select Files',
                'script': 'Handler.ashx',
                'folder': 'images',
                'fileDesc': 'Image Files',
                'fileExt': '*.jpg;*.jpeg;*.gif;*.png',
                'multi': true,
                'auto': true,
                'sizeLimit': (100 * 1024), //200 KB
                onError: function (a, b, c, d) {
                    if (d.type === "File Size") {
                        $("#lblmsg").html('File Size Should not exceed 100 KB');
                    }
                },
                onComplete: function () {
                    $("#lblmsg").html('');
                }
            });

Look at this above code in which we predefined the size of file is 100 KB. So if user upload the larger file then 100 kb then Appropriate message will be displayed to the user.

 MVC Registration Form with client and server side validation Validation in Registration Form in MVC4

Upload multiple file with progressbar Uploading multiple file at a time with progressbar



Tuesday, 4 February 2014




Description:-

            Before sometime we already explain that how to Display Gridview rowdetails in Tooltip when mouse is over on each Gridview record using Display Tooltip using javascript javascript.but now in this example we explain that same thing but difference is that we can here use Jquery instead of javascript.

To do this first we have to  added jQuery plugin and tooltip plugin by using those files we can display gridview row details in tooltip. or To  download attached sample code or from this url bassistance.de tooltip plugin




Here is Jquery code for display Gridview Detail in Tooltip when mouse is over

$(".gridViewToolTip").tooltip({
                track: true,
                delay: 0,
                showURL: false,
                fade: 100,
                bodyHandler: function () {
                    return $($(this).next().html());
                },
                showURL: false
            });




And css for the Tooltip because of display the Tooltip directally below the Below the cursor are as follows

#tooltip {
                position: absolute;
                z-index: 3000;
                border: 1px solid #111;
                background-color: #FEE18D;
                padding: 5px;
                opacity: 0.85;
}
#tooltip h3, #tooltip div { margin: 0; }

 Redirect to the other .aspx page using javascript client side redirection using javascript 

how to create thumbnails of the image in asp.net Create or generate thumbnails of the image 

Bind Dynamic data to Ajax Accordion Panel Bind Accordion Panel from database

Show Gridview Row Details in Tooltip on MouseHover using JQuery in Asp.net




Description:-

            Before sometime we already explain that how to Display Gridview rowdetails in Tooltip when mouse is over on each Gridview record using Display Tooltip using javascript javascript.but now in this example we explain that same thing but difference is that we can here use Jquery instead of javascript.

To do this first we have to  added jQuery plugin and tooltip plugin by using those files we can display gridview row details in tooltip. or To  download attached sample code or from this url bassistance.de tooltip plugin




Here is Jquery code for display Gridview Detail in Tooltip when mouse is over

$(".gridViewToolTip").tooltip({
                track: true,
                delay: 0,
                showURL: false,
                fade: 100,
                bodyHandler: function () {
                    return $($(this).next().html());
                },
                showURL: false
            });




And css for the Tooltip because of display the Tooltip directally below the Below the cursor are as follows

#tooltip {
                position: absolute;
                z-index: 3000;
                border: 1px solid #111;
                background-color: #FEE18D;
                padding: 5px;
                opacity: 0.85;
}
#tooltip h3, #tooltip div { margin: 0; }

 Redirect to the other .aspx page using javascript client side redirection using javascript 

how to create thumbnails of the image in asp.net Create or generate thumbnails of the image 

Bind Dynamic data to Ajax Accordion Panel Bind Accordion Panel from database