programming we consider all important topic for knowledge about controls,web Services, JSON, Ajax, database, and interview related Question. In this and sql server tutorial blog we give many examples of jquery as like How Play YouTube Video in Your Website by URL, How to Play YouTube Videos in by using Jquery , Jquery Change div background on mouseover in , JQuery UI Datepicker (Calendar) etc.

Wednesday, July 9, 2014

Post Back data Processing

Post Back data  Processing:

In this post we talk the nest topic after Event handling is we talk about Post back data processing. In this post we see how to do page  if post back event occur. how to data process in past back in 

Post Back Processing

isPostBack Use the “isPostBack” property to determine if the page is requested the  first time, or caused by a post back.

 Auto post back

 By default, only clicking a button or hitting the enter key in a textbox will cause post back.
 Set the “AutoPostBack” property to “True” to allow more controls to cause post back when the default event is work

Textbox: text is changed and textbox losses focus.Checkbox or radio button: check status is changed. Dropdown list, checkbox list, radio button list: selected item is changed.

<asp:CheckBox ID="CheckBox1" runat="server" AutoPostBack="true" />

here we take a Example and trying to show this.we take a dropdown list and protect data which is load at when the page load.we can not want to re- rander data on the drop down select index change.
remember here we can not want to re-load data on dropdownlist select index. for this work we make Event. 

 protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)

code for aspx page.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="mypage.aspx.cs" Inherits="mypage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

<html xmlns="">

<head runat="server">




    <form id="form1" runat="server">
        <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="true" 

Code for aspx.cs page

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

public partial class mypage : System.Web.UI.Page


    protected void Page_Load(object sender, EventArgs e)


    protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)


Related Post :