Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Alert Message Before Response.Redirect

Alert Message Before Response.Redirect

Scheduled Pinned Locked Moved ASP.NET
help
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Johndas
    wrote on last edited by
    #1

    Hi all, i have a issue. i need to display alert Message before the page is redirect to another page. 1)alert Message 2)Response.Redirect("test.aspx") Here, i have to use Response.Redirect complusory. Please Help Me. Thanks in Advance.

    JohnDas

    M M 2 Replies Last reply
    0
    • J Johndas

      Hi all, i have a issue. i need to display alert Message before the page is redirect to another page. 1)alert Message 2)Response.Redirect("test.aspx") Here, i have to use Response.Redirect complusory. Please Help Me. Thanks in Advance.

      JohnDas

      M Offline
      M Offline
      mr_muskurahat
      wrote on last edited by
      #2

      use inline javascript or clientscript block to achieve this functionality.. for example 1) scriptText = "window.alert(dsfas)"; ClientScriptManager.RegisterClientScriptBlock(this.GetType(), "CounterScript", scriptText, true); 2) Page.RegisterClientScriptBlock mehtod 3) http://support.microsoft.com/kb/817032[^] 4) http://www.eggheadcafe.com/community/aspnet/2/10045660/why-to-use-isclientscript.aspx[^]

      Government Dyal Singh College Lahore.

      1 Reply Last reply
      0
      • J Johndas

        Hi all, i have a issue. i need to display alert Message before the page is redirect to another page. 1)alert Message 2)Response.Redirect("test.aspx") Here, i have to use Response.Redirect complusory. Please Help Me. Thanks in Advance.

        JohnDas

        M Offline
        M Offline
        Muhammad Mazhar
        wrote on last edited by
        #3

        Alert is a client side operatoiin where as Response.Redirect is server side. You can't do both at same time because in your case you first need alert and then redirect. Soluton would be to out put some javascript that in turn do the desired task for you. For example try something like below in your ASP.NET code where you want this behaviour.

        Share your experience with others Check my Blog...

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups