P.S. Works great. I've only done a simple frameset with dummy pages going back and forth, but have done enough to convince myself that I can push on. Thanks again to you and Kevin for your help
----- Bill Borg wrote: ----
Dewek
1. That you'd take the time to write this hefty response is much appreciated--thank you
2. I'm dying to try it out (might be a late night). I've known about RegisterStartupScript, but have only done the very basics, and for one had just been thinking about the resulting script as part of a stream rather than something that would fire right away. Powerful stuff
Cheers
Bil
----- Dewek wrote: ----
From my experience with frames, I think you can do everything you described
Each frame can hold an ASPX page that has whatever logic it needs in it
code-behind module. You make each page do whatever it needs to do all b
itself. Then, given the frames - you need to have a way to get the frames t
work together (e.g., user selects a product in one frame and the detail
show up in another frame)
The two frame-coordination tasks I have tackled - and all I think you migh
need - include (1) user selects something from the list in the left frame
and the details show up in the right frame, and (2) users modify ite
properties (or delete an item altogether) in the right frame and the lef
frame gets updated to show the results of the user's actions
In my case I handled task 1 by using the target= attribute. Check it out i
the following HTML
<asp
ataList id="ThumbList" RepeatColumns="2" EnableViewState="false
runat="server"><ItemTemplate><table><tr><td><a href='PA_FullPhoto.aspx?ID=<%# DataBinder.Eval(Container.DataItem
"PhotoID") %>' target="mainFrame"><img src='Photos/Thumbs/<%# DataBinder.Eval(Container.DataItem
"FileNameThumb") %>' width="80" height="80" border="0"></a></td></tr></table></ItemTemplate></asp
ataList
What results is a DataList that displays two columns of photo thumbnail
(could be a list of products you are selling...). When a user clicks on on
of them, the page PA_FullPhoto.aspx is opened in the frame designated by th
target= attribute. The querystring has a property named ID (populated a
runtime of course) that controls which photo (or widget) details ar
displayed in the right frame. PA_FullPhoto.aspx, which is the page tha
appears in the right frame with all the details, has code-behind logic tha
retrieves the QueryString value of ID and retrieves the correspondin
details from the database, then renders to the browser/right frame. So thi
accomplishes task 1 - user selects something in left frame and details sho
up in right frame. Pretty straight-forward
Task 2 is a bit trickier. What you are doing is updating the database fro
the right frame, and then requiring that another frame (which essentiall
knows nothing about what's going on in any other frame), to display th
results of the activity that took place in the right frame. To break th
solution down, all you have to do is (1) have the product detail/databas
update logic get executed from the code behind the page that resides in th
right frame; (2) as the last step of that server-side logic, trigger som
JavaScript in the client that will cause the bottom-pane cart to redispla
itself; and (3) in the bottom pane page's (cart page in your scenario
code-behind logic, fetch the poduct detail information from the databas
(this is the data that was just updated in the right frame). If you've bee
around the block once or twice then doing steps 1 and 3 should be n
problem. Step 2 - triggering the JavaScript is the key to making this al
hang together. Your friend in this case is the RegisterStartupScript
procedure which will send some JavaScript down to the client - which will
execute it immediately on the client (with no action required on the part of
the user): Your variation of the following code needs to get executed as the
last step in the logic that updates the database from the right pane:
scriptString = "<script
language=JavaScript>parent.leftFrame.location.reload(true)</script>";
if(!this.IsClientScriptBlockRegistered("clientScript")){
this.RegisterStartupScript("clientScript", scriptString);
}
Notice the JavaScript buried in the scriptString:
parent.leftFrame.location.reload
For your case it would be something like
parent.bottomCartFrame.location.reload (or whatever name you give to your
bottom frame if not 'bottomCartFrame').
In my case I have a photo album and not a shopping cart - but everything I
did can be abstracted to do everything you'd need for a product catalog.
I hope this helps. Let me know if you'd like any of this clarified.
Dewek
Bill Borg said:
people out here (including no less than Mr. Spencer himself) that they're a
bit of a pain because ASP.NET doesn't provide much support, but I still like
the basic functionality they provide--fixed location, the user can resize,
scroll bars as necessary, etc.--which I'm guessing is why you are using them
too.something like this: LeftPane has product list. User can click to add to
shopping cart. RightPane has details of particular product, in synch with
selections in left pane. User can specify additional attributes, special
instructions, etc. and again can add to cart. BottomPane has the cart
itself, a user control that shows whatever is in the cart. It provides its
own logic for removing items.make this work, but I'd love to try. Looking for a nudge in the right
direction of the basic structure of something like this--e.g. you have a
master page, it server-side redirects to the left page, that page tells the
cart on the bottom to refresh itself, etc. Any thoughts are much
appreciated.