Multiple Content Panes / Forms Tags

M

MikeB

Hello,

I have a content page that is from a Master page which has 2 content panes.
How do I add my forms to the content page? Each pane needs a form but you
can not have multiple form tags nor can the form tages be outside of the
content tags?

Does this make since? Below is my source to the pages. Basically I need
both content tags to have form tags.

%@ Page Language="C#" MasterPageFile="~/Main.master" AutoEventWireup="true"
CodeFile="Inventory.aspx.cs" Inherits="Inventory" Title="Enterprises, LLC"
%>


<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"
Runat="Server">

<asp:Label ID="lblHeader" runat="server" Text="Welcome to our online
store, selet a Category on the left to view our products."
CssClass="NonHeaderLabel" Width="100%"></asp:Label>&nbsp;
<asp:GridView ID="gvProducts" runat="server"
AllowPaging="True"
OnPageIndexChanging = "gvProducts_PageIndexChanging"
OnRowDataBound = "gvProducts_RowDataBound"
AutoGenerateColumns="False" CellPadding="3" DataKeyNames="ProductID"
GridLines="Horizontal" PageSize="25" Width="100%"
<Columns>
<asp:TemplateField>
<EditItemTemplate>
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<img src='Handler.ashx?Size=S&ProductID=<%#
Eval("ProductID") %>&CompanyID=<%# Eval("CompanyID") %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Title">
<EditItemTemplate>
<asp:TextBox ID="TextBox1" runat="server" Text='<%#
Bind("Title") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%#
Bind("Title") %>'></asp:Label><BR>
<asp:Label ID="Label2" runat="server" Text='<%#
Bind("ProductCondition") %>'></asp:Label>
</ItemTemplate>
<ItemStyle VerticalAlign="Top" />
said:
<ItemStyle VerticalAlign="Top" />
</asp:BoundField>
<asp:TemplateField HeaderText="Price">
<EditItemTemplate>
<asp:TextBox ID="TextBox3" runat="server" Text='<%#
Bind("Price") %>'></asp:TextBox>
</EditItemTemplate>
<ItemStyle VerticalAlign="Top" />
<ItemTemplate>
<asp:Label ID="lblprice" runat="server" Text='<%#
Bind("Price") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:ButtonField ButtonType="Button" Text="Details">
<ControlStyle CssClass="ButtonStyle" />
<ItemStyle Width="50px" VerticalAlign="Top" />
</asp:ButtonField>
</Columns>
<HeaderStyle CssClass="GridViewHeader" />
<AlternatingRowStyle CssClass="GridViewAltRow" />
</asp:GridView>

</asp:Content>
<asp:Content ID="Content2" runat="server"
ContentPlaceHolderID="Contentplaceholder2">

<asp:Label ID="Label1" runat="server" CssClass="HeaderLabel"
Text="Categories" Width="100%"></asp:Label>
<asp:DataList ID="dlCategories" runat="server" DataKeyField="ID">
<ItemTemplate>
<asp:LinkButton ID="LinkButton1" runat="server"
OnCommand="CategoryButtonClick" CommandArgument='<%# Eval("ID").ToString()
%>' CommandName='<%# Eval("CategoryDescription").ToString() %>' ><%#
Eval("CategoryDescription").ToString() %></asp:LinkButton>

</ItemTemplate>
</asp:DataList>
</asp:Content>
 
B

Ben Rush

Why is the form from within the master page not enough? Why do you need a
second/third form?

The way it works is the Page will have a single child control, the master
page, and then that control will have multiple child controls....your
content page controls. When you view the control tree as such, the form is
still part of the control tree if its specified in the master page.

.....so, I'm confused why you cannot just use the form from the master page?
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top