S
Savas Ates
I have a simple Data list control in my user control. When I run my main
page and i use response.write to see grid query it writes 2 times. I checked
my query results it is true. My datalist doesnt show anything. What can be
the problem ?
<cc1:RDBCartList id="RDBCartList1" runat="server"
BottomDefaultTypeID="CARTHIS_BOTTOM1" BottomTypeID="CARTHIS_BOTTOM1"
EmptyDefaultTypeID="CARTHIS_EMPTY1" EmptyTypeID="CARTHIS_EMPTY1"
TopDefaultTypeID="CARTHIS_TOP1"
TopTypeID="CARTHIS_TOP1" TopFormatID="CARTHIS" InnerFormatID="CARTHIS"
EmptyFormatID="CARTHIS"
BottomFormatID="CARTHIS"></cc1:RDBCartList>
<aspataList id="DataList1" runat="server">
<ItemTemplate>
<table>
<tr>
<td>
<%# DataBinder.Eval(Container, "DataItem.CI_Billing_Email")%>
</td>
<td>
<%# DataBinder.Eval(Container, "Cart_ID")%>
</td>
</tr>
</table>
</ItemTemplate>
</aspataList>
CODEBEHIND
/////////////////////////////
cmd="SELECT * FROM Carts,PaymentInformations,CartInformations where
Carts.MainCompany='Market' and CartInformations.MainCompany='Market' and
PaymentInformations.MainCompany='Market' and
Carts.Cart_ID=PaymentInformations.PI_ID and
Carts.Cart_ID=CartInformations.CI_ID and Carts.Cart_AccountCompany='Market'
and Carts.Cart_AccountID='1' order by Carts.Cart_RegisterTime desc ";
baglantim=new SqlConnection ();
baglantim.ConnectionString =data.Connection.ConnectionString;
baglantim.Open ();
SqlCommand mycmd=new SqlCommand(cmd,baglantim);
Response.Write (cmd);
SqlDataAdapter da = new SqlDataAdapter ();
DataSet ds =new DataSet();
da.SelectCommand =mycmd;
da.Fill (ds,"MyTable");
DataList1.DataSource =ds;
DataList1.DataBind ();
page and i use response.write to see grid query it writes 2 times. I checked
my query results it is true. My datalist doesnt show anything. What can be
the problem ?
<cc1:RDBCartList id="RDBCartList1" runat="server"
BottomDefaultTypeID="CARTHIS_BOTTOM1" BottomTypeID="CARTHIS_BOTTOM1"
EmptyDefaultTypeID="CARTHIS_EMPTY1" EmptyTypeID="CARTHIS_EMPTY1"
TopDefaultTypeID="CARTHIS_TOP1"
TopTypeID="CARTHIS_TOP1" TopFormatID="CARTHIS" InnerFormatID="CARTHIS"
EmptyFormatID="CARTHIS"
BottomFormatID="CARTHIS"></cc1:RDBCartList>
<aspataList id="DataList1" runat="server">
<ItemTemplate>
<table>
<tr>
<td>
<%# DataBinder.Eval(Container, "DataItem.CI_Billing_Email")%>
</td>
<td>
<%# DataBinder.Eval(Container, "Cart_ID")%>
</td>
</tr>
</table>
</ItemTemplate>
</aspataList>
CODEBEHIND
/////////////////////////////
cmd="SELECT * FROM Carts,PaymentInformations,CartInformations where
Carts.MainCompany='Market' and CartInformations.MainCompany='Market' and
PaymentInformations.MainCompany='Market' and
Carts.Cart_ID=PaymentInformations.PI_ID and
Carts.Cart_ID=CartInformations.CI_ID and Carts.Cart_AccountCompany='Market'
and Carts.Cart_AccountID='1' order by Carts.Cart_RegisterTime desc ";
baglantim=new SqlConnection ();
baglantim.ConnectionString =data.Connection.ConnectionString;
baglantim.Open ();
SqlCommand mycmd=new SqlCommand(cmd,baglantim);
Response.Write (cmd);
SqlDataAdapter da = new SqlDataAdapter ();
DataSet ds =new DataSet();
da.SelectCommand =mycmd;
da.Fill (ds,"MyTable");
DataList1.DataSource =ds;
DataList1.DataBind ();