Using ControlParameter with TextBox inside Repeater
Inside the OnItemCreated event (of the repeater), I get the ID of the textbox that I want to bind to the ControlParameter. I realized that using the ID alone was not working. I get a message saying something like "can't find txtBoxName in ControlParameter". I read somewhere that if I view the page source of the browser, then use the value in the Name attribute of the textbox (for the controlId property of the controlParameter), it works. But I also noticed that when I use a textbox outside the repeater, I could just use the ID of the textbox (without having to use page source to get the name, which is different from the ID in the aspx page, of the textbox). Can anyone explain the reasoning behind this?
Re: Using ControlParameter with TextBox inside Repeater
Hello,
This is all to do with the fact that each control, on the client, has to have a unique ID. In the case of a textbox directly on the page, there isn't an issue, however, when you place a Textbox within a Repeater, or other such control, that same Textbox is placed on the page in multiple places, and has such, each one will have a unique ID.
Can you show the ASPX and code markup for what you are trying to achieve and we can take a look.
Gary