hello,
this is my coding. the javascript function onkeyup is invoking when i type any text on textbox and assigning gridview client id inside the javascript. BUT WHY IT IS NOT DOING POSTBACK (Why it is not going to code behind language - aspx.cs)..I have been working on 4 days..really i am not able to figure out. if anybody knows, help me. Thank you.
here my coding:
<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
CodeBehind="Default.aspx.cs" Inherits="WebApplication6._Default" %>
| <%# Eval("question") %> |
| <%# Eval("answer") %> |
aspx.cs (codebehind)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
namespace WebApplication6
{
public partial class _Default : System.Web.UI.Page
{
DataTable dt = new DataTable();
protected void Page_Load(object sender, EventArgs e)
{
dt.Columns.Add("question", typeof(string));
dt.Columns.Add("answer", typeof(string));
dt.Rows.Add("What is IT", "information technology is changing everything");
GridView1.DataSource = dt;
GridView1.DataBind();
}
}
}
SUNIL GUTTAPosted Jan 26, 2014, 1:42 PM