How to open another aspx page in a specific frame?

  • Thread starter Thread starter Peter
  • Start date Start date
P

Peter

Hi

I am very new to ASP development and I have a problem that I have spent days
on and cannot find a solution. Any help would be gratefully accepted.

I am using VB.NET to develop a ASP.NET application. I have a Frameset html
page with 2 frames, on frame 1 I have a LinkButton which will process some
data (not coded yet) and then open another aspx page on frame 2.

Can I achieve this using VB.NET? If not do I have to use client side
scripting?

I currently have the following but it loads the page in Frame 1.

Private Sub LinkButton1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles LinkButton1.Click

Response.Redirect("MainMenu.aspx")

End Sub

Thanks in advance, Peter
 
Many thanks for coming back to me.

I have tried this and it works fine, but how do I execute code before the
page is displayed? for example if I need to check whether the user has
access to the page.

Peter
 
Use Javascript in the button click event on the server. Response.write lets
you run scripts after events execute on the server.

Response.Write("<SCRIPT>window.framename.location='blah.aspx'</SCRIPT>")

** note that java syntax probably isn't correct. I'm too lazy to look it up
though. =)
 
Back
Top