ASP. NET Retrieve filter value from <ItemTemplate>

DeMoNiaC

New Member
I'd like to access to the value of a filter (MONTH or YEAR) from the hyperlink control located inside the ItemTemplate tag of my gridview (from aspx, not code behind): \[code\]<aps:Repeater ID="rpt" runat="server"><ItemTemplate><asp:DropDownList ID="ddlYear" runat="server" AutoPostBack="true" OnSelectedIndexChanged="fctn_OnSelectedIndexChanged" Width="155px" AppendDataBoundItems="true"></asp:DropDownList><asp:DropDownList ID="ddlMonth" runat="server" OnSelectedIndexChanged="fctn_OnSelectedIndexChanged" AutoPostBack="true"><asp:ListItem Text="January" Value="http://stackoverflow.com/questions/15551922/1" />...<asp:ListItem Text="December" Value="http://stackoverflow.com/questions/15551922/12" /></asp:DropDownList>...<asp:HyperLink ID="lbl" ClientIDMode="Static" runat="server" NavigateUrl='<%# page.aspx?month=[...]&year=[...]&e=Eval("ID_EMPLOYEE") %>' />..</ItemTemplate></aps:Repeater><asp:EntityDataSource ID="DataSource" runat="server" ConnectionString="name=db_name" AutoGenerateOrderByClause="True" DefaultContainerName="..." EntitySetName="EntName" EnableFlattening="false" EnableUpdate="false" EnableInsert="false"><WhereParameters><asp:ControlParameter ControlID="ddlYear" DefaultValue="http://stackoverflow.com/questions/15551922/%" Name="YEAR" PropertyName="Text" Type="Int32" /><asp:ControlParameter ControlID="ddlMonth" DefaultValue="http://stackoverflow.com/questions/15551922/%" Name="MONTH" PropertyName="Text" Type="Int32" /> </WhereParameters></asp:EntityDataSource>\[/code\]The filters (MONTH and YEAR) are 'Where parameters' of the data source of the gridview.Do you have any idea how to do this?Thanks!
 
Back
Top