|
Subject:
|
Regarding loop statement
|
|
Posted By:
|
kalpesh.mahajan
|
Post Date:
|
8/18/2006 5:20:19 AM
|
I need pass some names from database table to a webpage by using loop and while doing that i dont want to pass the first name to the page. Is there any condition statement i can use to do that? Thanx in advance........
With Regards Kalepsh Mahajan
|
|
Reply By:
|
dparsons
|
Reply Date:
|
8/18/2006 12:39:42 PM
|
Depending on how you return the data from the database will depend on how you display the data, below is how you would loop through the data in a datatable, selecting only the column of data that you want to display.
foreach(DataRow dr in dt.Rows) { Response.Write(dr["PassValue"]); }
"The one language all programmers understand is profanity."
|
|
Reply By:
|
ADMystery
|
Reply Date:
|
8/30/2006 4:55:01 AM
|
Dear, It's not clear at all what you are exactly trying to do, are you displaying them using Response Object and constructing HTML Table for example or displaying them in a datagrid, what language are you using C# or Vb.NET, what Data access method you use Connected or Disconnected model (Command returning data in a DataReader or DataAdapter returning data in a DataSet).
please clarify this, to help me help you if I can :-) Regards Ahmad Mohsen
|