My immediate answer is "anything is possible." :D
I'm thinking through the design your talking about and I am wondering if Master Pages might be overkill. I think you could probably do it but I don't think you would really need to. The Master Page is mostly meant to be a layout structure you apply to multiple pages. It looks like, from the image you showed, that this is more of a page specific issue. Like you will have one page that can display 3 different gridviews for each of 2 different areas on that page. Is that right? I realize I don't know the specifics of your project so it's possible I am off-target. If so, just let me know and I will think about it some more.
Now, with that being said, if I understand your design issue properly, the way I would probably do it is to have two different MultiView controls on the page, and then add a view to the appropriate MultiView control for each of the different views you need (GridView or FormView controls). I would then use LinkButton controls to navigate the MultiView controls. This would look something like this:
Code:
<table>
<tr>
<td align="left">
<asp:LinkButton ID="LinkButton1" runat="server" onclick="LinkButton1_Click">Grid 1</asp:LinkButton> |
<asp:LinkButton ID="LinkButton2" runat="server" onclick="LinkButton2_Click">Grid 2</asp:LinkButton> |
<asp:LinkButton ID="LinkButton3" runat="server" onclick="LinkButton3_Click">Grid 3</asp:LinkButton> |
</td>
<td align="right">
<asp:LinkButton ID="LinkButton4" runat="server" onclick="LinkButton4_Click">Grid 4</asp:LinkButton> |
<asp:LinkButton ID="LinkButton5" runat="server" onclick="LinkButton5_Click">Grid 5</asp:LinkButton> |
<asp:LinkButton ID="LinkButton6" runat="server" onclick="LinkButton6_Click">Grid 6</asp:LinkButton> |
</td>
</tr>
<tr>
<td align="left">
<asp:MultiView ID="MultiView1" runat="server">
<asp:View ID="View1" runat="server">Grid 1:<br /><asp:GridView ID="GridView1" runat="server" /></asp:View>
<asp:View ID="View2" runat="server">Grid 2:<br /><asp:GridView ID="GridView2" runat="server" /></asp:View>
<asp:View ID="View3" runat="server">Grid 3:<br /><asp:GridView ID="GridView3" runat="server" /></asp:View>
</asp:MultiView>
</td>
<td align="right">
<asp:MultiView ID="MultiView2" runat="server">
<asp:View ID="View4" runat="server">Grid 4:<br /><asp:GridView ID="GridView4" runat="server" /></asp:View>
<asp:View ID="View5" runat="server">Grid 5:<br /><asp:GridView ID="GridView5" runat="server" /></asp:View>
<asp:View ID="View6" runat="server">Grid 6:<br /><asp:GridView ID="GridView6" runat="server" /></asp:View>
</asp:MultiView>
</td>
</tr>
</table>
I'm just using some tables for demonstration purposes. You could easily do the alignment and such in CSS (which is what I would do in a real project - I just didn't want to get into all of the CSS code to dilute this example).
In the code-behind, you would need methods for each of the OnClick events in the LinkButton controls used to navigate the views in the MultiView control. This would probably look something like this:
Code:
protected void LinkButton1_Click(object sender, EventArgs e)
{
MultiView1.ActiveViewIndex = 0;
}
protected void LinkButton2_Click(object sender, EventArgs e)
{
MultiView1.ActiveViewIndex = 1;
}
protected void LinkButton3_Click(object sender, EventArgs e)
{
MultiView1.ActiveViewIndex = 2;
}
protected void LinkButton4_Click(object sender, EventArgs e)
{
MultiView2.ActiveViewIndex = 0;
}
protected void LinkButton5_Click(object sender, EventArgs e)
{
MultiView2.ActiveViewIndex = 1;
}
protected void LinkButton6_Click(object sender, EventArgs e)
{
MultiView2.ActiveViewIndex = 2;
}
As you can see, when you click on LinkButton1, it fires off the LinkButton1_Click method, which sets the index of the active view of MultiView1 to zero (0).
Now, if you wanted to be really cool about it, I would wrap all of that functionality inside of an AJAX UpdatePanel so that the MultiView controls are updated without any screen flicker. But that's just me. :)
Hope this helps. If I didn't quite nail what you were getting at, please don't hesitate to reask.
Oh, and thanks for reading the book!
-Jacob
01000111
01000101
01000101
01001011