PC Review


Reply
Thread Tools Rate Thread

DATALIST PROBLEM IN USER CONTROL

 
 
Savas Ates
Guest
Posts: n/a
 
      6th Sep 2006
/////////////////ASPX/////////////////////


<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>

//////////////////////////////////////////////////////

////////////////CODEBEHIN////////////////////

this.RDBCartList1.getHTML ();

cmd=RDBCartList1.SQL;



baglantim=new SqlConnection ();


baglantim.ConnectionString =data.Connection.ConnectionString;

baglantim.Open ();


SqlCommand mycmd=new SqlCommand(cmd,baglantim);


mycmd.ExecuteNonQuery ();

/*

rd=mycmd.ExecuteReader ();


while (rd.Read())

{

SqlDataReader rd;

Response.Write (rd["Cart_ID"] +"<br>");


}

*/


SqlDataAdapter da = new SqlDataAdapter ();

DataSet ds =new DataSet();




da.SelectCommand =mycmd;

da.Fill (ds,"MyTable");


DataList1.DataSource =ds;

DataList1.DataBind ();





When I run my code The datalist returns nothing to the screen . I tested my
connection and query , it works. When i run the code with comment (inside /*
*/ block) it works perfect. I think there is a problem with my datalist ?
What can be the problem ?


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
USER CONTROL DATALIST PROBLEM Savas Ates Microsoft C# .NET 0 7th Sep 2006 08:54 AM
user control with datalist =?Utf-8?B?cm9kY2hhcg==?= Microsoft ASP .NET 0 21st Jul 2006 06:06 AM
2.0 Adding Web user Control to DataList Josh Microsoft ASP .NET 0 27th Jun 2006 02:38 PM
ASP 2.0 Problem with Nesting User Control containing a GridView within a DataList s.gregory@4castweb.com Microsoft ASP .NET 0 6th Dec 2005 05:19 PM
Using a user control as EditItemTemplate in a DataList Hans Merkl Microsoft ASP .NET 2 17th Nov 2005 03:04 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:52 AM.