webcontrols as frames...Help!

D

Dan Nigro

I am trying not to use frames in asp.net but this is my problem. I have an
image viewer I am trying to developed. The top portion is the [navigator]
(next, previous page, zoom etc). The left side is [thumbnails] and the rest
is the [main viewer]. I did this same thing in asp with frames no problem.
To learn something I am trying to do it with webontrols. I have 3 controls
and a parent page. Here is the break down.

Parent: (viewer.aspx)
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="viewer.aspx.vb"
Inherits="ImageViewer.viewer"%>
<%@ Register TagPrefix="image" TagName="main" Src="image_main.ascx" %>
<%@ Register TagPrefix="image" TagName="nav" Src="image_nav.ascx" %>
<%@ Register TagPrefix="image" TagName="thumb" Src="image_thumb.ascx" %>
....and then I have a table
<table>
<tr><td colspan=2><image:nav id="imgNav"
runat="server"></image:nav></td></tr>
<tr>
<td><image:thumb id="imgThumb" runat="server"></image:thumb></td>
<td><image:main id="imgMain" runat="server"></image:main></td>
</tr>
</table>

My [image:main] holds all the image properties (imgpage, imgid, imgheight,
imgwidth, stec) so I thought from the [image:nav] if the user wanted to go
to next page I could "get" the current page then "set" by incrementing it
one. The problem is when I click the "next page" button all the properties
of [image:main] get reset. Maybe I am referencing [image:main] wrong from
[image:nav] but I see the [image:main] properties just fine?

[image:main] not only has the properties but it also has a table with one
cell that holds an <img> tag. I have a public sub "DisplayImage" that sets
that tag based on the properties. The page will load just fine the first
time but if I set the properties and then call "DisplayImage" from
[image:nav] the properties are correct and the img tag is correct but
nothing happens, the page loads with the previous image?? It must be a
page_load issue or something. I can only update the img tag from page_load?

To get this to slightly work I took out the nav and thumbnail controls and
placed buttons on the parent. This works ok but I have to hold the
[image:main] in a session variable because again its properties are reset
when I click a parent button. The problem here is the page reloads all the
time and that will suck with my thumbnails. Is there a way to do this like
I am trying or do I need to go back to frames? Thanks in advanced.
 

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,780
Messages
2,569,609
Members
45,254
Latest member
Top Crypto TwitterChannel

Latest Threads

Top