If i will enter student roll no in text box,immediately i want to display the student details without using submit button.can anyone please tell me...
Regards,
Saritha
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Sathish Pabbathi99 reputationPosted Apr 22, 2013, 3:18 AM EDT
Saritha65 reputationPosted Apr 22, 2013, 3:25 AM EDT
I tried it...but after entering roll no,if i will press enter then only it will display the student details...if u know..please provide me code...
Sathish Pabbathi99 reputationPosted Apr 22, 2013, 3:33 AM EDT
Saritha65 reputationPosted Apr 22, 2013, 3:39 AM EDT
Sathish Pabbathi99 reputationPosted Apr 22, 2013, 3:48 AM EDT
Saritha65 reputationPosted Apr 22, 2013, 3:55 AM EDT
Saritha65 reputationPosted Apr 22, 2013, 4:19 AM EDT
Sathish Pabbathi99 reputationPosted Apr 22, 2013, 4:56 AM EDT
Saritha65 reputationPosted Apr 22, 2013, 9:49 PM EDT
Can u please provide me any javascript code for that...i don't have idea about ajax Autocomplete extender...
Sathish Pabbathi99 reputationPosted Apr 22, 2013, 10:03 PM EDT
http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/AutoComplete/AutoComplete.aspx
and to work with ajax in your aspx page addthe below tag in second or third line of your .aspx
source page
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>and also you have to add AjaxControlToolkit dll in your Solution Explorer References section
Sathish Pabbathi99 reputationPosted Apr 22, 2013, 10:30 PM EDT
Saritha65 reputationPosted Apr 22, 2013, 11:07 PM EDT
Thanks for ur solution....
Sathish Pabbathi99 reputationPosted Apr 22, 2013, 11:12 PM EDT
Satyapriya NayakRank #47 · 31.5K reputationPosted Apr 23, 2013, 1:36 AM EDT
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
namespace Textbox_gridview
{
public partial class _Default : System.Web.UI.Page
{
string strConnString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
string str;
SqlCommand com;
SqlDataAdapter sqlda;
DataSet ds;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
bindgrid();
}
}
public void bindgrid()
{
SqlConnection con = new SqlConnection(strConnString);
con.Open();
str = "select * from employee";
com = new SqlCommand(str, con);
sqlda = new SqlDataAdapter(com);
ds = new DataSet();
sqlda.Fill(ds, "employee");
GridView1.DataMember = "employee";
GridView1.DataSource = ds;
GridView1.DataBind();
con.Close();
}
protected void txt_empid_TextChanged(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection(strConnString);
con.Open();
str = "select * from employee where empid like '" + txt_empid.Text + "%'";
com = new SqlCommand(str, con);
sqlda = new SqlDataAdapter(com);
ds = new DataSet();
sqlda.Fill(ds, "employee");
GridView1.DataMember = "employee";
GridView1.DataSource = ds;
GridView1.DataBind();
con.Close();
}
protected void Timer1_Tick(object sender, EventArgs e)
{
Label3.Text = DateTime.Now.ToString();
}
}
}