如何将值从选定的行(gridview)传递到另一行? [英] How to pass the value from a selected row(gridview) into another?

查看:66
本文介绍了如何将值从选定的行(gridview)传递到另一行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有gridview的页面:

Person.aspx

 ID ||名称||邮件||电话



此gridview的值保存在名为Person的SQL表中。



gridview下有一个按钮(添加任务)

如果点击它,你将进入另一个页面(Task.aspx),其中有3个文本框:

标题,任务和&最后期限;此文本框的值保存在名为Task的SQL表中。



SQL表任务有4列标题,任务,截止日期和名称。



Soo long story short:我想要的是,如果你从gridview中选择一个人来添加一个任务,那么Person的名字应该自动保存到SQL表任务Name中< br $> b $ b

我尝试了什么:



我认为它应该是SelectedIndexChanged Methode但不幸的是,没有任何事情发生在我的脑海里

解决方案

建议你尝试这样的事情 ASP.Net Pass或将GridView行值发送到具有HyperLink的其他页面 [ ^ ]



一旦你克下一页中的行信息(来自第1页),使用该信息添加到任务表以及第二页信息



希望这会有所帮助。

I have a page with a gridview:
Person.aspx

ID||Name||Mail||Phone


the value of this gridview is saved in an SQL table named Person.

under the gridview there is a button(Add Task)
if you click on it, you will get to another page(Task.aspx) with 3 TextBoxes:
Title, Task, & Deadline; the value of this Textboxes is saved in an SQL table named Task.

The SQL Table Task has 4 columns Titel, Task, Deadline AND Name.

Soo long story short: I want that, if you choose a Person from the gridview an add a task the Name of the Person should be saved automatically into the SQL Table Task "Name"

What I have tried:

I think it should be SelectedIndexChanged Methode, but unfortunately, nothing comes to my mind

解决方案

Suggesting you to try something like this ASP.Net Pass or Send GridView Row Values to other Page with HyperLink[^]

once you get row information(from page 1) in next page, use that information to add into "TASK" table along with second page information

Hope this helps.


这篇关于如何将值从选定的行(gridview)传递到另一行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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