Click here to Skip to main content
15,895,557 members
Home / Discussions / C#
   

C#

 
GeneralRe: TreeView and ImageList Pin
Anonymous22-Sep-05 20:56
Anonymous22-Sep-05 20:56 
GeneralRe: TreeView and ImageList Pin
Dave Kreskowiak23-Sep-05 2:26
mveDave Kreskowiak23-Sep-05 2:26 
QuestionIs remote machie alive Pin
Mazdak21-Sep-05 22:03
Mazdak21-Sep-05 22:03 
AnswerRe: Is remote machie alive Pin
Dave Kreskowiak22-Sep-05 5:13
mveDave Kreskowiak22-Sep-05 5:13 
Questionhow to get variable name. Pin
ab.hamad21-Sep-05 21:33
ab.hamad21-Sep-05 21:33 
AnswerRe: how to get variable name. Pin
lmoelleb21-Sep-05 22:04
lmoelleb21-Sep-05 22:04 
QuestionDatagrid Scrollbars - Enlarge Pin
toticow21-Sep-05 20:34
susstoticow21-Sep-05 20:34 
QuestionNeed help: FileInfo Class Pin
SikeMullivan21-Sep-05 19:28
SikeMullivan21-Sep-05 19:28 
My problem: When the for loop funs it only verifies that the first file exists. The second time it runs through it auto-matically thinks the second file it is checking exits and writes the imgUrl path to the data table.


Someone please help!!!


searches run = new searches(System.Configuration.ConfigurationSettings.AppSettings.Get("ConnectionString"));
DataTable dt = new DataTable();
dt = run.searchpersonals(dtsend);
int myMatches = dt.Rows.Count;
dt.Columns.Add( new DataColumn("imgUrl"));
String[] imgUrl = new String[myMatches];


for( int i = 0; i < myMatches; i++)
{
imgUrl[i] = "usergraphics/user" + dt.Rows[i]["profile_id"] + ".jpg";

if( new FileInfo( Server.MapPath(imgUrl[i])).Exists)
{
dt.Rows[i]["imgUrl"] = imgUrl[i];
}
else
{
dt.Rows[i]["imgUrl"] = "usergraphics/default.jpg";
}
}
Repeater2.DataSource = dt;
Repeater2.DataBind();

Sully.... Thank you
GeneralRe: Need help: FileInfo Class Pin
Guffa22-Sep-05 0:53
Guffa22-Sep-05 0:53 
QuestionSimple office automation Pin
dotnetquery21-Sep-05 19:19
dotnetquery21-Sep-05 19:19 
QuestionDrag-and-drop files to desktop using shell Pin
ha.dungle21-Sep-05 17:59
ha.dungle21-Sep-05 17:59 
QuestionForm Controls Pin
deepscyberpulse21-Sep-05 16:58
deepscyberpulse21-Sep-05 16:58 
AnswerRe: Form Controls Pin
Christian Graus21-Sep-05 17:04
protectorChristian Graus21-Sep-05 17:04 
AnswerRe: Form Controls Pin
Ashok Dhamija21-Sep-05 18:30
Ashok Dhamija21-Sep-05 18:30 
QuestioncomboBox woes Pin
WetRivrRat21-Sep-05 16:42
WetRivrRat21-Sep-05 16:42 
AnswerNeverMind!!! Pin
WetRivrRat21-Sep-05 17:12
WetRivrRat21-Sep-05 17:12 
QuestionDateTimePicker Pin
NormBohana21-Sep-05 15:14
NormBohana21-Sep-05 15:14 
Questionpersisting graphics Pin
Pyro Joe21-Sep-05 14:17
Pyro Joe21-Sep-05 14:17 
QuestionOpenSSL Wrapper Pin
IsaacB21-Sep-05 12:26
IsaacB21-Sep-05 12:26 
QuestionDataGrid Row Colours Pin
Kayess Tech21-Sep-05 11:35
professionalKayess Tech21-Sep-05 11:35 
AnswerRe: DataGrid Row Colours Pin
Peter Molnar21-Sep-05 14:20
Peter Molnar21-Sep-05 14:20 
GeneralRe: DataGrid Row Colours Pin
Kayess Tech21-Sep-05 14:26
professionalKayess Tech21-Sep-05 14:26 
AnswerRe: DataGrid Row Colours Pin
Mazdak21-Sep-05 22:19
Mazdak21-Sep-05 22:19 
AnswerRe: DataGrid Row Colours Pin
zaboboa22-Sep-05 2:53
zaboboa22-Sep-05 2:53 
QuestionDirectX to .NET Bitmap object Pin
elf2321-Sep-05 11:11
elf2321-Sep-05 11:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.