473,320 Members | 1,988 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Redirecting user

Hello

In the following code to redirect a user after logging on

Expand|Select|Wrap|Line Numbers
  1.   Protected Sub LogonBtn_Click(sender As Object, e As EventArgs) Handles LogonBtn.Click
  2.  
  3.         'Authenticate user
  4.  
  5.         Dim Authenticated As Boolean = Authenticate(strEmailTextBox.Text, passwordTextBox.Text)
  6.  
  7. 'If results found then redirect to the userpage.aspx
  8.  
  9.         If Authenticated Then
  10.  
  11.             Dim target = String.Format("~/userpage.aspx?strEmailValue={0}", strEmailTextBox.Text)
  12.  
  13.             Response.Redirect(target, False)
  14.  
  15.         End If
  16.  
  17.     End Sub
What does

Expand|Select|Wrap|Line Numbers
  1.  Response.Redirect(target, False)
do that

Expand|Select|Wrap|Line Numbers
  1.  Response.Redirect(target, True)
does not do?

Thanks
Jul 12 '16 #1

✓ answered by Luk3r

The Boolean value is simply telling the current page to either stop loading (True) or continue loading (False). The Response.Redirect method contains two possible uses:
Expand|Select|Wrap|Line Numbers
  1. Response.Redirect(url as string)
and
Expand|Select|Wrap|Line Numbers
  1. Response.Redirect(url as string, pageResponse as Boolean)

2 894
Luk3r
300 256MB
The Boolean value is simply telling the current page to either stop loading (True) or continue loading (False). The Response.Redirect method contains two possible uses:
Expand|Select|Wrap|Line Numbers
  1. Response.Redirect(url as string)
and
Expand|Select|Wrap|Line Numbers
  1. Response.Redirect(url as string, pageResponse as Boolean)
Jul 12 '16 #2
Thanks Luc3R

So I would probably want to choose 'True' as in 'stop loading when you authenticate'?

I have used both

Expand|Select|Wrap|Line Numbers
  1. Response.Redirect(target, False)
Expand|Select|Wrap|Line Numbers
  1. Response.Redirect(target, True)
with a real email and password stored in a database and I have been successfully redirected whichever I used, False or True, so I just wondered.

Thanks again.
Jul 12 '16 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Brendan | last post by:
Hi I just made a script that gets a bunch of login info and I've come across a hurdle that I failed to think about it.. and now think I may have wasted my time... The login info I retreive...
3
by: Marlon | last post by:
I have a site that is now SSL secured. User not still using the http:// to get to the site. How can I redirect the user the the visited page using https:// ?
4
by: Marty U. | last post by:
I have a Session variable I need to check the value of. If it is value a then redirect to some page. I need to implement this in a user control that is on all the relevent pages. I placed the if...
8
by: Morpheus | last post by:
I am trying to test a function that outputs text to the standard output, presumably using a cout call. I do not have access to the source, but need to test the output. Is this possible? I can...
1
by: kang jia | last post by:
hi when user entered particulars in signuppage and click" signup" button, i will direct them to do_signup.php. if say the NRIC is dupicate in datebase, i will redirect them back to signup page...
41
by: amygdala | last post by:
Hello all, I have posted a similar question in comp.lang.php in the past, but haven't had any response to it then. I kinda swept the problem under the rug since then. But I would really like to...
2
realin
by: realin | last post by:
hi guys, this one is simple for you :P its like.. after login how would i redirect the user back to the page he came from .. first i have to choose a language ? shall i do it in JS or...
9
by: Jonathan Wood | last post by:
I've spent days trying to come up with a solution. I'd appreciate it if anyone can help. My site requires all users to log on. There are three different roles of users, and each user type will...
7
by: vjayis | last post by:
Hi I have created a loginpage in which the user enters their username and password., the page gets loaded and validates the input and then it is redirectesd to the seeeion page using html...
3
pradeepjain
by: pradeepjain | last post by:
hii guys, i am redirecting my website to an error page when it cannot connect to mysql database .because of this the url of the page gets changed to error page url .so the user will...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.