|
-
Apr 7th, 2003, 01:15 PM
#1
Thread Starter
Member
-
Apr 7th, 2003, 01:28 PM
#2
PowerPoster
Not sure exactly what you mean, but try something like this:
Code:
Dim i As Integer
Dim redirect As Boolean = False
For i = 0 To ds.Tables(0).Rows.Count - 1
If id = ds.Tables(0).Rows(i)(0) Then
name.Text = ds.Tables(0).Rows(i)(1)
gender.Text = ds.Tables(0).Rows(i)(1)
dob.Text = ds.Tables(0).Rows(i)(1)
mail.Text = ds.Tables(0).Rows(i)(1)
label2.Text = ds.Tables(0).Rows(i)(1)
ELSE
redirect = True
End If
Next
If redirect = True Then
Response.Redirect("mypage")
End If
-
Apr 7th, 2003, 01:33 PM
#3
Thread Starter
Member
but this way it will onli do the FOR loop once... ???
isin't it?
-
Apr 7th, 2003, 01:36 PM
#4
PowerPoster
No, it will do the for loop all the way through. After it is done, it will see if the for loop changed the boolean to true. If it did, then it will redirect.
-
Apr 7th, 2003, 01:37 PM
#5
Thread Starter
Member
ok
thanks..
got the idea liao...
really thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|