Monday, July 29, 2013

Bind data to Asp.net text box using jquery

Title: JQuery bind data to asp.net text box using Blur function

Description:
As per previous articles we have gone through different kind of data binding examples using jquery in asp.net.Now here we will learn about the usage of jquery functionality for web control.

Example:
Now i would like give an example to set the data to Text box in asp.net using jquery.This application will use to  set the food orders.As per requirement we need to assign the value to text box control based on food category Id.To accomplish this task  i have utilized  Jquery script function i:e Blur() which make the functionality what ever we used inside of it

$(document).ready(function() {
$("#<%= txtOrderList.ClientID %>").blur(function(){
var orderList = $(this).val();
$("#<%= txtOrderList1.ClientID %>".val(orderList); 
});

The above script will will bind the data to text box when the other text box focus has moved.You can use this functionality as per requirement very quickly.
This article may help you a lot..Keep visit my website
Post a Comment

Bel