Quantcast
Channel: Web Forms
Viewing all articles
Browse latest Browse all 23244

databinding methods error

$
0
0


I have problem in some
page it can't be displayed
in the browser ,it gives me this
error
Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control

and this is my full code

<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Site.master" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Admin_Default2" %><asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server"><style type="text/css">
        .style1
        {
            width: 100%;
        }
        .style2
        {
            height: 24px;
        }</style></asp:Content><asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server"><table cellpadding="0" class="style1"><tr><td class="style2"><asp:Label ID="Label1" runat="server" Text="ProjectSpecificTitle"></asp:Label></td><td class="style2"><asp:TextBox ID="txtspectitle" runat="server"></asp:TextBox></td><td class="style2"><asp:Label ID="Label2" runat="server" Text="ProjectGeneralTitle"></asp:Label></td><td class="style2"><asp:TextBox ID="txtgeneralTitle" runat="server"></asp:TextBox></td></tr><tr><td><asp:Label ID="Label3" runat="server" Text="ProjectStart:"></asp:Label></td><td><asp:TextBox ID="txtstartPr" runat="server"></asp:TextBox></td><td><asp:Label ID="Label4" runat="server" Text="ProjectEnd"></asp:Label></td><td><asp:TextBox ID="txtendProject" runat="server"></asp:TextBox></td></tr><tr><td><asp:Label ID="Label5" runat="server" Text="ProjectCurrentProblem"></asp:Label></td><td><asp:TextBox ID="txtcurrPro" runat="server"></asp:TextBox></td><td><asp:Label ID="Label6" runat="server" Text="ProjectSuggestedSolution"></asp:Label></td><td><asp:TextBox ID="txtsuggesSolve" runat="server"></asp:TextBox></td></tr><tr><td><asp:Label ID="Label7" runat="server" Text="ProjectAims"></asp:Label></td><td><asp:TextBox ID="txtaims" runat="server"></asp:TextBox></td><td><asp:Label ID="Label8" runat="server" Text="SRequirements"></asp:Label></td><td><asp:TextBox ID="txtsoftware" runat="server"></asp:TextBox></td></tr><tr><td><asp:Label ID="Label9" runat="server" Text="HRequirements"></asp:Label></td><td><asp:TextBox ID="txthrequirement" runat="server"></asp:TextBox></td><td><asp:Label ID="Label10" runat="server" Text="SystemDirectory"></asp:Label></td><td><asp:TextBox ID="txtdirectory" runat="server"></asp:TextBox></td></tr><tr><td><asp:Label ID="Label11" runat="server" Text="ProjectStatus"></asp:Label></td><td><asp:TextBox ID="txtProstatus" runat="server"></asp:TextBox></td><td><asp:Label ID="Label12" runat="server" Text="TeamID"></asp:Label></td><td><asp:DropDownList ID="DropDownList1" runat="server"
                                        DataSourceID="SqlDataSource1" DataTextField="TeamDisc" DataValueField="TeamID"
                                        Height="16px" SelectedValue='<%# bind("TeamID") %>'
                    Width="146px"></asp:DropDownList><asp:SqlDataSource ID="SqlDataSource1" runat="server"
                    ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
                    SelectCommand="SELECT [TeamID], [TeamDisc] FROM [Team]"></asp:SqlDataSource></td></tr><tr><td><asp:Button ID="Button1" runat="server" CssClass="button-3"
                    onclick="Button1_Click" Text="Insert" /></td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr></table></asp:Content>



this is first time I face error
like this
any one can help me
many thanks


Viewing all articles
Browse latest Browse all 23244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>