单击按钮时的gridview行命令事件 [英] gridview row command event on button click

查看:110
本文介绍了单击按钮时的gridview行命令事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


gridview模板中有一个按钮控件,如果单击,所选行数据将显示在文本框中,并且所选行数据也将传输到下一页.
请告诉我


there is a button control in gridview template,if i click ,the selected row data will be displayed in textbox and also the selected row data will be transferred to next page.
pls tell me

推荐答案


以下是查询字符串的示例.

Hi,
Following is example of Query String.

protected void GridView1_SelectedIndexChanged(object sender,
EventArgs e)
{
// Get the currently selected row using the SelectedRow
property.
GridViewRow row = GridView1.SelectedRow;
TextBox2.Text = row.Cells[2].Text;

Response.Redirect("NextPage.aspx?User=" + row.Cells[0].Text + "&Address=" +  row.Cells[1].Text;
}




谢谢,
Imdadhusen




Thanks,
Imdadhusen


hell ..这不会解决问题..
hell.. this won''t solve prob..


这篇关于单击按钮时的gridview行命令事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆