Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 3.5 > ASP.NET 3.5 Basics
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
ASP.NET 3.5 Basics If you are new to ASP or ASP.NET programming with version 3.5, this is the forum to begin asking questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 20th, 2008, 06:15 AM
Authorized User
 
Join Date: Jun 2008
Location: p, g, Malaysia.
Posts: 17
Thanks: 1
Thanked 0 Times in 0 Posts
Default pop up message problem

hi, why the pop up message does not show when i there got redirect after the pop up code... like that:

  Page.ClientScript.RegisterStartupScript(GetType(St ring), "a", "<script>alert('aaa')</script>")

Response.Redirect("a.aspx")

if remove the redirect then the pop up message work...

  #2 (permalink)  
Old July 21st, 2008, 09:12 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

When you use "Response.Redirect", ASP.NET issues a "Status 302: Page Moved" response to the browser. No HTML ever gets to the browser, so the browser only responds to the redirect. In order to do what you describe, you must use an alternate method of redirecting. If you want to show a javascript alert box, then you could similarly use javascript to "redirect" the user (document.location.href = '<new page here>';). Put that after the alert and the page will change after the user clicks OK on the alert. Otherwise, you can use a redirect meta tag for an explicit timed redirect.

-Peter
compiledthoughts.com
  #3 (permalink)  
Old July 22nd, 2008, 07:28 AM
Authorized User
 
Join Date: Jun 2008
Location: p, g, Malaysia.
Posts: 17
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Thank. It Work using javascript redirect. i just curious. how to redirect using meta tag?

  #4 (permalink)  
Old July 22nd, 2008, 08:54 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

http://www.google.com/search?q=redirect+meta+tag

-Peter
compiledthoughts.com
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pop-up problem lathika ASP.NET 2.0 Basics 2 July 26th, 2007 09:35 AM
Problem with Pop-up Menus JazzyJ Dreamweaver (all versions) 0 July 12th, 2006 12:17 AM
The problem with pop-up menu and dropdown list williamwang ASP.NET 1.0 and 1.1 Basics 1 April 14th, 2004 02:33 PM
inisiating a pop up message from the server yuvalk Classic ASP Basics 0 March 27th, 2004 01:23 PM



All times are GMT -4. The time now is 10:18 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.