| |

VerySource

 Forgot password?
 Register
Search
View: 764|Reply: 2

repeater nesting problem

[Copy link]

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-1-19 12:40:01
| Show all posts |Read mode
private void NRepeater_ItemDataBound (object sender, System.Web.UI.WebControls.RepeaterItemEventArgs e)
{
for (int i = 0; i <this.NRepeater.Items.Count; i ++)
{
NRepeater.Items [i] .FindControl ("zp_lx"). Visible = false;
}
zp_lx is a LABEL control. I want to determine whether to display the control according to the parameters, but the page display is such an effect. For example, when displaying 6 pieces of data, the first piece of data, the property displayed by the Label control is not FALSE, but If true, what is the reason?
Reply

Use magic Report

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

 Author| Post time: 2020-1-26 10:27:01
| Show all posts
Another problem is that the output of this.NRepeater.Items.Count is 01234. How did you return to the division?
Reply

Use magic Report

1

Threads

18

Posts

15.00

Credits

Newbie

Rank: 1

Credits
15.00

 China

Post time: 2020-1-26 13:36:01
| Show all posts
try debug.
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list