User-416249946 posted
Hi,
Im trying to create one Custom Control for creating BarChart.
I used IHttpHandler interface.
1 private DataTable _dataSourceTable;
2 public DataTable DataSourceTable
3 {
4 get { return _dataSourceTable; }
5 set { _dataSourceTable = value; }
6 }
7
8 private string _dataValueFieldName;
9 public string DataValueFieldName
10 {
11 get { return _dataValueFieldName; }
12 set { _dataValueFieldName = value; }
13 }
14
15 private string _dataKeyFieldName;
16 public string DataKeyFieldName
17 {
18 get { return _dataKeyFieldName; }
19 set { _dataKeyFieldName = value; }
20 }
21
22 ..............
23 ...............
24
25 protected override void Render(HtmlTextWriter output)
26 {
27 output.AddAttribute(HtmlTextWriterAttribute.Src, "ChartCustomControl.axd?uid=" + this.MyUniqueID);
28 base.Render(output);
29
30 }
31
32 public void ProcessRequest(HttpContext context)
33 {
34 DataTable dt = _dataSourceTable;
35 GenerateBarChart(context);
36 }
37 ...................
38 ....................
In the above code in line number 34, the value for _dataSourceTable is not retaining.
Can anyone explain me how to solve this problem..?