Hi, thanks for replying, but do you mind cutting in out in cardboard
letters for this newbie. Perhaps I should also explain myself a little
better.
Page.aspx looks like this (simplified here)
<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="page.aspx.vb" Inherits="test.home" %>
<%@ Register TagPrefix="test" Tagname="part1" Src="part1.ascx"%>
<%@ Register TagPrefix="test" Tagname="part2" Src="part2.ascx"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="
http://schemas.microsoft.com/intellisense/ie5"
name="vs_targetSchema">
<LINK href="styles.css" type="text/css" rel="stylesheet">
</HEAD>
<body>
<div id="wrapper">
<form id="Form1" method="post" runat="server">
<div id="top"><test
art1 id="part1"
runat="server"></test
art1></div>
<div id="bottom"><test
art2 id="part2"
runat="server"></test
art2></div>
</form>
</div>
</body>
</HTML>
Now, inside part1.ascx, I am paging through records in a table (lets
call it table1) of a database, displaying a lot of fields. However
there is another table in part2.ascx which shows related records from
another table (table2) in a datagrid. So what I want is that each time
a new record is displayed in part1.ascx, part2.ascx is reloaded
displaying the related records from table2 in the datagrid. My idea is
therefore to store as a session variable the current record number (the
primary key) of table1, and then add the necessary code to the click
events of the "next" and "previous" buttons of part1.ascx which would
update the session variable and then cause the part2.ascx to reload.
The session variable mentioned before would act as the variable element
in the sql statement firing the dataadapter behind the datagrid in
part2.ascx. Following your advice, I have tried to simply add:
loadcontrol("part2.ascx)"
to the click event codes (after updated the session variable) but
nothing happens.
Thanks in advance,
TB