Accesing embedded controls??

O

ozgur develioglu

Hi,

I've a DropDownList in the header part of a template column, but I can't
learn what value is selected with it. Here is my code:

<asp:TemplateColumn>
........
<HeaderStyle BorderWidth="1px"
BorderColor="#585D70"></HeaderStyle>
<HeaderTemplate>
Gösterilen:&nbsp;
<asp:DropDownList id="ddlPageItemCount" runat="server"
Width="40px" OnSelectedIndexChanged="deneme"
AutoPostBack="True">
<asp:ListItem Value="10"></asp:ListItem>
<asp:ListItem Value="20"></asp:ListItem>
<asp:ListItem Value="50"></asp:ListItem>
</asp:DropDownList>
</HeaderTemplate>
.......
</asp:TemplateColumn>

I've tried:
DropDownList ddl= (DropDownList) FindControl("ddlPageItemCount");

but ddl becomes null;
Please help!!!
 

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

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top