Redirect after 5 seconds only if bolNeedToRedirect=True ?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jonathan

    Redirect after 5 seconds only if bolNeedToRedirect=True ?

    I want to redirect a vb.net aspx page after 5 seconds only if a variable
    bolNeedToRedire ct=True. This variable is determined after code sees whether
    a person is logged in.

    How could I achive this considering the header meta tag for redirecting
    can't be switched based on a Boolean variable?


  • Mark Rae [MVP]

    #2
    Re: Redirect after 5 seconds only if bolNeedToRedire ct=True ?

    "Jialiang Ge [MSFT]" <jialge@online. microsoft.comwr ote in message
    news:%23y2SR4bf IHA.1500@TK2MSF TNGHUB02.phx.gb l...
    <SCRIPT LANGUAGE="JavaS cript">
    That is deprecated syntax - you should be encouraging people to use: <script
    type="text/javascript"inst ead...



    --
    Mark Rae
    ASP.NET MVP


    Comment

    • Jialiang Ge [MSFT]

      #3
      Re: Redirect after 5 seconds only if bolNeedToRedire ct=True ?

      Thank you, Mark. That is indeed a good point.

      Hello Jonathan, I am sorry that I made a mistake in <SCRIPT
      LANGUAGE="JavaS cript">. This is a deprecated syntax as Mark said, and
      please use
      <script type="text/javascript"inst ead.

      Thanks
      Jialiang Ge (jialge@online. microsoft.com, remove 'online.')
      Microsoft Online Community Support

      =============== =============== =============== ====
      When responding to posts, please "Reply to Group" via your newsreader
      so that others may learn and benefit from your issue.
      =============== =============== =============== ====
      This posting is provided "AS IS" with no warranties, and confers no rights.

      Comment

      • Jialiang Ge [MSFT]

        #4
        Re: Redirect after 5 seconds only if bolNeedToRedire ct=True ?

        Hello Jonathan,

        "Delayed" page redirecting is a client side happening. Server side code is
        not able to control when to redirect the page directly. It needs to write
        some javascript code to client side, and let the client code finish the
        redirecting.

        The corresponding VB.NET code is:

        Response.Write( "<script>redirT imer();</script>")

        (remove the ';' in the end of the C# code line)

        Regards,
        Jialiang Ge (jialge@online. microsoft.com, remove 'online.')
        Microsoft Online Community Support

        =============== =============== =============== ====
        Delighting our customers is our #1 priority. We welcome your comments and
        suggestions about how we can improve the support we provide to you. Please
        feel free to let my manager know what you think of the level of service
        provided. You can send feedback directly to my manager at:
        msdnmg@microsof t.com.

        This posting is provided "AS IS" with no warranties, and confers no rights.
        =============== =============== =============== ====

        Comment

        Working...