Using a frame with Visual Basic.NET

G

Giovanni Cobos

Hi:

I am developing a web page using Visual Basic .NET. I want to put a frame in
my web page in which I am using this code

<FRAMESET cols="134,84%">
<FRAME name="NavBar" src="WebBarra.aspx" scrolling="auto">
<FRAME name="MainFrame" src="WebPrincipal.aspx" scrolling="auto">
</FRAMESET>

In WebBarra.aspx I have the bottons to make the hiperlinks, when I clic on
the botton I use the response.redirect("Pagina.aspx") and the web page is
being updated in the same frame. How can I do to make that when I clic the
botton in the Frame: "NavBar" the page will be loaded in the Frame:
"MainFrame".

Finally, I would appreciate if you can help me because I would like to make
static the division of the frame.

Thanking you in advance for your help.

Regards,
Giovanni Cobos
 
M

Mad Murdoch

Ensure the IFRAME is set to runat=server give it an ID and here is the code

Dim myContentPane As HtmlGenericControl

myContentPane = Me.FindControl("TheIFRAMEIDName")

myContentPane.Attributes("src") = "http://www.microsoft.com"
 
G

Giovanni Cobos

Thank you for your soon reply. I did it but I got the following error in the
line: myContentPane.Attributes("src") = "http://www.microsoft.com"
Reference to the object not stablished as an instance of the object. Can you
help my to solve this problem?

Again thank you very much for your time and help.

Giovanni
 

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

Top