pass other value than #VALX and #VALY in postback of series to get value on chart click event

Posted by rahularyansharma on Stack Overflow See other posts from Stack Overflow or by rahularyansharma
Published on 2012-10-05T09:29:25Z Indexed on 2012/10/05 9:37 UTC
Read the original article Hit count: 399

I am using asp.net chart control and i want to use chart click event to get the deptId value of bar click in bar chart .

  <Series>                       
                        <asp:Series Name="Tour" ChartType="Column" ChartArea="MainChartArea"  PostBackValue="#VALX">
                        </asp:Series>
                        <asp:Series Name="Inspection" ChartType="Column" ChartArea="MainChartArea" PostBackValue="#VALX">
                        </asp:Series>
                        <asp:Series Name="NightHalt" ChartType="Column" ChartArea="MainChartArea" PostBackValue="#VALX">
                        </asp:Series>
                    </Series>

I am using department name to show on X axis but i want to capture deptid on chart click event . In above markup i use #VALX in series postback event but its give me deptname in click event

  protected void AllDepartmentComparisonBarChart_Click(object sender, ImageMapEventArgs e)
        {
            e.PostBackValue;

        }

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about parameters