hi i need to display database content through labels in place of variabels.
On Thu, Apr 23, 2009 at 2:17 PM, Jaswinder <[email protected]> wrote: > > Vikas What you realy wants to do..?? > explane it > > but you can also go for > > ** > > string s1 = ""; > > *string s2 = ""; * > > *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.<http://in.rd.yahoo.com/tagline_groups_6/*http://in.promos.yahoo.com/groups/> >> >> ------------------------------ >> Now surf faster and smarter ! Check out the new Firefox 3 - Yahoo! Edition >> * Click >> here!<http://in.rd.yahoo.com/tagline_firefox_1/*http://downloads.yahoo.com/in/firefox/> >> > > > ------------------------------ > Bollywood news, movie reviews, film trailers and more! Click > here.<http://in.rd.yahoo.com/tagline_movies_1/*http://in.movies.yahoo.com/?wm=n/> >
