• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 218
  • Last Modified:

Frames

Hi,

I have design a web application in which I am making use of Frames,In which I am loading the
pages as per choice of user from a treeview which is in main page,In a particular page I want to
Redirect the user to Login Page by calling the page and bypassing all the frames.

When I tried to achive this with normal Syntax of ASP.NET as Response.Redirect("Default.aspx"),
Its loding that page in same frame(which is currently active),I want to bypass that frame and the page containing that frame and want to show the Default page directly.

I tried several codes and scripts for the same but somehow not getting the results what I want.

Can anyone help me on this?

Thanks
Viv's
0
vikasbapat
Asked:
vikasbapat
  • 3
  • 3
1 Solution
 
appariCommented:
you have to use javascript and redirect.
0
 
appariCommented:
in place of response.redirect in your code try this

dim strScript as string
strScript = "<Script Language=JavaScript>window.top..location.href=" & Chr(34) & "Default.aspx" & Chr(34) & "</script>"

Me.Page.RegisterStartupScript("ShowDefault", strScript)
0
 
appariCommented:
in place of response.redirect in your code try this

dim strScript as string
strScript = "<Script Language=JavaScript>window.top.location.href=" & Chr(34) & "Default.aspx" & Chr(34) & "</script>"

Me.Page.RegisterStartupScript("ShowDefault", strScript)
0
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
vikasbapatAuthor Commented:
It is giving build error in chr(34)

I am using C#

I also used

Strings.Chr(34) in place of chr(34)
0
 
vikasbapatAuthor Commented:
Its working
i used that in the last line of my button click eveny as
Response.Write("<Script Language=JavaScript>window.top.location.href='Default.aspx'</script>");

Thanks all for such a great help............

0
 
vikasbapatAuthor Commented:
Thanks all for such a great help.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now