TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Rajkumar R
NA
183
220.5k
Can anyone say how to bind data in to repeater control
Nov 21 2011 6:22 AM
I have tried the following code but it doesn't display data in the repeater control..
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
LOADINGREAPETER();
}
}
public void LOADINGREAPETER()
{
SqlConnection CN = DBUtil.GetCon();
if (CN.State != ConnectionState.Closed)
CN.Close();
CN.Open();
string q = "Select Convert(nVarchar,A.Rec_No) CRec,A.Acc_Name Descr,A.Quantity Qty,Convert(nVarchar,A.Sell_Rate) SRate,Sell_CName Sname , Sell_CCode SCCode, Sell_CValue SCValue ,Convert(float,A.Quantity*A.Sell_Rate*Sell_CValue) as SAmount, A.Service_Tax STax,Convert(nVarchar,(A.Quantity*A.Sell_Rate*Sell_CValue)* A.Service_Tax/100)Tax_Amount,Convert(Float,((A.Quantity*A.Sell_Rate*Sell_CValue)+(A.Quantity*A.Sell_Rate*Sell_CValue)* A.Service_Tax/100)) as Net From eLogs_Invoice_Charges_Details A Where A.Invoice_Code='INV1'";
SqlDataAdapter da = new SqlDataAdapter(q, CN);
DataTable dtable = new DataTable();
da.Fill(dtable);
Repeater1.DataSource = dtable;
Repeater1.DataBind();
CN.Close();
}
Please tell me how to bind data
Reply
Answers (
3
)
How to read XML attribute values ?
How to call a webservice from windows mobile application to website published in another server or machine ,Not in the Local machine ?