Vikas,
  Your Code will give same output in vb...
Are you tryied  ?

Now You can Try To Do Your Task :

  while (dr.Read()) 
    { 
        label1.Text += dr[0].ToString(); 
        label2.Text += dr[0].ToString(); 
        Response.Write("</ br>"); 
    } 
 
Regards,

 
JONY GREAT 

tech-prastish.com
CELL NO:9872471054




________________________________
From: vikas arora <[email protected]>
To: [email protected]
Sent: Thursday, 23 April, 2009 11:40:22 AM
Subject: [DotNetDevelopment] regarding datareader or dataset

hi all, 
i m a vb.net programmer
now i need to create a page in c#

in vb.net when we need to retrieve the value in label from datareader we apply

While dr.Read

label1.Text= dr(0).ToString()
label2.Text= dr(0).ToString()
Response.Write("<br>")

End While

& the following code retrieve all the values from the database

but in c# it displayes only last row 

plz help 

Thanx
----------


________________________________

________________________________
Explore your hobbies and interests. Click here to begin.


      Own a website.Get an unlimited package.Pay next to nothing.*Go to 
http://in.business.yahoo.com/

Reply via email to