Vikas What you realy wants to do..??
        explane it

but you can also go for
 
string s1 = ""; 
while (dr.Read) 
{ 
        s1 = dr[0].ToString(); 
        s2 = dr[1].ToString();         
        Response.Write( s1 + "            "+s2+ "<br>") 
}
 
JONY GREAT
tech-prastish.com 
CELL NO:9872471054




________________________________
From: vikas arora <[email protected]>
To: [email protected]
Sent: Thursday, 23 April, 2009 12:57:59 PM
Subject: [DotNetDevelopment] Re: regarding datareader or dataset

hai all,

sorry jaswinder, in place of label i m using variabels

while dr.Read

dim s1,s2 as string

s1=dr(0).ToString()
s2=dr(1).ToString()

Response.Write(s1)
Response.Write(s2)
Response.Write("<br>")

End While


& i need labels to show the result in place of variabels.

Plz Help


On Thu, Apr 23, 2009 at 11:59 AM, Jaswinder <[email protected]> wrote:



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.
________________________________
Now surf faster and smarter ! Check out the new Firefox 3 - Yahoo! Edition * 
Click here!


________________________________

string s2 = ""; 


      Share files, take polls, and make new friends - all under one roof. Go to 
http://in.promos.yahoo.com/groups/

Reply via email to