c# - Getting Repeater By String in ASP.NET -


i have bunch of repeaters in aspx page "repeater1","repeater2", etc

i want access them

for(int = 0; < 5; i++)     // repeater findrepeater("repeater"+i) , bind 

in code behind page_load tried

repeater repeater = (repeater)this.findcontrol("repeater"+i) 

but says can't cast control repeater.

how can done?

i'm running same code (except converting i tostring()), , building fine. can try this..

repeater repeater = this.findcontrol("repeater"+i.tostring()) repeater; 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -