This is a migrated thread and some comments may be shown as answers.

Display label value before redirect

1 Answer 109 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
L
Top achievements
Rank 1
L asked on 29 Dec 2008, 10:01 AM
hi

Here i have a code that need to display the value of the label before redirect. The redirect is workiing fine but it just could not display the label value even though i place a thread. The else statemenrt is working fine.

If

x.CheckUserAndPassword(txtUsername.Text, txtCurrentPassword.Text, txtNewPassword.Text) Then

 

lblerror.Enabled =

True

 

lblerror.Text =

"Change Success"

 

 

Threading.Thread.Sleep(5000)

 

Response.Redirect(

"~/Login.aspx", False)

 

 

Else

 

lblerror.Text =

"Try Again, Your username or password does not match"

 

 

End If

 


Thanks in advance.

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 29 Dec 2008, 11:02 AM
Hello Lui,

Please try another approach:
Label1.Text = "TEST"
ScriptManager.RegisterStartupScript(thistypeof(Page), "myscript""location.href='http://www.telerik.com';"true); 

Regards,
Daniel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
General Discussions
Asked by
L
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or