Problem with a dropdownlist within a repeater

  • Thread starter Thread starter JazzLover
  • Start date Start date
J

JazzLover

We have some javascript code that depends on the name of the
dropdownlists to be the same as it parses them in an array, but within
a repeater the webcontrols generate a uniqueid with ctl0: and some
other junk prepended. Is there anyway we can prevent the dropdownlist
from writing out its mangled name?
 
It mangles the name to ensure all the control names are unique.

One solution is to generate an array of names on the server by
checking the ClientID property of each DropDownList and sending the
array to the client for JavaScript to use with
Page.RegisterArrayDeclaration. You could gather the names to use
during the ItemDataBound event of the Repeater.

HTH,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top