Link to home
Start Free TrialLog in
Avatar of Peter Chan
Peter ChanFlag for Hong Kong

asked on

Message not shown

Hi,
Relevant message is not being shown by this line below. Why?
Page.ClientScript.RegisterStartupScript(this.GetType(), "InfoB", "javascript:alert('Password has been successfully changed.');", true);

Open in new window

Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Relevant message is not being shown by this line below. Why?
try:

1. check in the generated html codes, see whether that line of code was being generated and called.
2. debugging in your C# code make sure your program runs on that line of code

3. there's a possibility that you got some Javascript before that line of code, hence the message is not being shown on screen.
Just created a sample for you. It is working for me.
WebSite4.zip
for my previous comment on pt 3:

3. there's a possibility that you got some Javascript errors before that line of code, hence the message is not being shown on screen
Avatar of Peter Chan

ASKER

The alert line is working but the problem is, in the following, I cannot see the relevant message being shown, if it would then go to another page!

                Page.ClientScript.RegisterStartupScript(this.GetType(), "InfoB", "alert('Password has been successfully changed.');", true);
                Response.Redirect("http://abc.co/Own_rec4/Default.aspx?userid=" + lb_userabbr.Text);

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial