Hello; these below codes give whole data of my Rehber datas. But if i want to show web page via Gridview send me out of memory exception error.
GenoTip.BAL:
public static List<Rehber> GetAllDataOfRehber()
{
using (GenoTipSatisEntities genSatisCtx = new GenoTipSatisEntities())
{
ObjectQuery<Rehber> rehber = genSatisCtx.Rehber;
return rehber.ToList();
}
}
if i bind data directly dummy gridview like that no problem occures every thing is great!!!
<asp:GridView ID="gwRehber" runat="server">
</asp:GridView>
if above codes send data to Satis.aspx page:
using GenoTip.BAL;
namespace GenoTip.Web.ContentPages.Satis
{
public partial class Satis : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
gwRehber.DataSource = SatisServices.GetAllDataOfRehber();
gwRehber.DataBind();
//gwRehber.Columns[0].Visible = false;
}
}
}
}
but i rearranged my gridview send me out of memory exception!!!! i need this arrangenment to show deta!!!
<asp:GridView ID="gwRehber" runat="server">
<Columns>
<%-- <asp:TemplateField>
<ItemTemplate>
<asp:Button runat="server" ID="btnID" CommandName="select" CommandArgument='<%# Eval("ID") %>' Text="Seç" />
</ItemTemplate>
</asp:TemplateField>--%>
<asp:BoundField DataField="Ad" HeaderText="Ad" />
<asp:BoundField DataField="BireyID" HeaderText="BireyID" Visible="false" />
<asp:BoundField DataField="Degistiren" HeaderText="Değiştiren" />
<asp:BoundField DataField="EklemeTarihi" HeaderText="EklemeTarihi" />
<asp:BoundField DataField="DegistirmeTarihi" HeaderText="Değiştirme Tarihi" Visible="false" />
<asp:BoundField DataField="Ekleyen" HeaderText="Ekleyen" />
<asp:BoundField DataField="ID" HeaderText="ID" Visible="false" />
<asp:BoundField DataField="Imza" HeaderText="Imza" />
<asp:BoundField DataField="KurumID" HeaderText="KurumID" Visible="false" />
</Columns>
</asp:GridView>
Error Detail :