使用c#比较asp.net中的gridview和repeater控件项 [英] Compare the gridview and repeater control items in asp.net using c#
问题描述
中继器控制如下在Gridview中如下
coursename coursedate coursecode coursename coursedate coursecode
RAFF 3月30日太平洋标准时间3月30日太平洋标准时间3月30日PSTF
RPST 30 mar 14 PSTF RPST 30 mar 14 PSTF
MFA 29 3月14日AMC
i想要比较Gridview第3行课程代码(AMC)和Repeater控制第2行课程代码(PSTF)。
如果两个课程代码匹配我想要的显示消息课程代码匹配。
如果两个课程代码不匹配我想显示消息课程代码不匹配。
为什么我在asp.net中使用c#做什么。
问候,
Jegan B.
[Agent_Spock]
- 添加了适当的标签
Repeater control as follows In Gridview as follows
coursename coursedate coursecode coursename coursedate coursecode
RAFF 30 mar 14 PSTF RAFF 30 mar 14 PSTF
RPST 30 mar 14 PSTF RPST 30 mar 14 PSTF
MFA 29 mar 14 AMC
i want to compare the Gridview 3rd row coursecode(AMC) and Repeater control 2nd row coursecode(PSTF).
if both course code matches i want to show the message coursecode matches.
if both course code not matches i want to show the message coursecode not matches.
for that how can i do in asp.net using c#.
Regards,
Jegan B.
[Agent_Spock]
- Added Appropriate tag
1。循环遍历Repeater
。
2.循环内部,再次循环GridView
行。
3.在第二个循环中,从Repeater
和GridView
中获取列循环计数器的帮助。
4.比较并做你的东西。
1. Loop through theRepeater
.
2. Inside the Loop, again Loop forGridView
Rows.
3. Inside the second loop, fetch the Column fromRepeater
andGridView
with the help of Loop counters.
4. Compare and do your stuff.
这篇关于使用c#比较asp.net中的gridview和repeater控件项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!