• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 234
  • 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
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

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