使用c#比较asp.net中的gridview和repeater控件项 [英] Compare the gridview and repeater control items in asp.net using c#

查看:51
本文介绍了使用c#比较asp.net中的gridview和repeater控件项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

中继器控制如下在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 the Repeater.
2. Inside the Loop, again Loop for GridView Rows.
3. Inside the second loop, fetch the Column from Repeater and GridView with the help of Loop counters.
4. Compare and do your stuff.


这篇关于使用c#比较asp.net中的gridview和repeater控件项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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