How to open another aspx page in a specific frame?

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
 
P

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
 
E

Eric Wise

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. =)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top