0
我需要从文本框中输入数值作为数值。 我需要从输入的文本框和从数据库值中检索的数据执行产品。 如何在文本框上按下按键事件?asp.net文本框中的按键事件
SqlConnection objcon = new SqlConnection(conn);
objcon.Open();
string SQL = "select * from Price";
SqlCommand objCommand = new SqlCommand(SQL, objcon);
SqlDataAdapter adapter = new SqlDataAdapter();
DataSet DS = new DataSet();
adapter.SelectCommand = objCommand;
adapter.Fill(DS);
DataTable dt = DS.Tables[0];
DataView dvWindows = new DataView(dt);
dvWindows.RowFilter = "Description = 'Windows'";
foreach (DataRowView rowView in dvWindows)
{
DataRow row = rowView.Row;
decimal d =Convert.ToInt32(txtncores.Text) * (decimal)row["CoreCost"];// txtncores is textbox
txtWindows.Text = d.ToString();// result value to populate in text box
}
帮助我,我需要在同一页上使用Ajax的局部更新了闪烁
绝对,AJAX是你的出路 – Rab 2013-03-10 17:30:33
如何在文本框上使用按键事件? – Anand 2013-03-10 17:37:10
你需要谷歌有点为它 – Rab 2013-03-10 17:40:06