i have made a simple table (lets call it volunteers), but when i want to call it in my code behind Visual studio can not recognize it. The error is cannot resolve symbol 'volunteers'.
here is the code:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="root_VerifyUsers.aspx.cs"
MasterPageFile="~/Root.Master" %>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<p>
<asp:Table runat="server" ID="volunteers" ForeColor="Green" Width="100%" Height="85%" BorderColor="Red"></asp:Table>
<asp:TableHeaderCell ID="NationalId" runat="server">National Id</asp:TableHeaderCell>
<asp:TableHeaderCell ID="Email" runat="server">Email</asp:TableHeaderCell>
</p>
</asp:Content>
that is behind code:
public partial class RootVerifyUsers : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
TableRow tr = new TableRow();
TableCell fname = new TableCell();
TableCell NationalId=new TableCell();
tr.Cells.Add(NationalId);
volunteers.Rows.add(tr);
}
}