Click here to Skip to main content
12,242,189 members (44,730 online)
   

ASP.NET

 
QuestionI am having error on my dbml (InternetTransaction Project) Pin
Difameg Network Nigeria10-Oct-12 23:26
memberDifameg Network Nigeria10-Oct-12 23:26 
Can Some One help me to resolve this error that i am geting on my application
 
I am using autogenerated code from Object Relational designer that is Name.designer.cs to connect to my sql database but i am getting this error
 
Default.aspx
 
<asp:GridView ID="GridView1" runat="server" Width="100%"
AutoGenerateColumns="False">
<Columns>
<asp:BoundField DataField="Trandate" HeaderText="Tran Date">
<ItemStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:BoundField DataField="deposit" DataFormatString="{0:F2}"
HeaderText="Deposit">
<ItemStyle HorizontalAlign="Right" />
</asp:BoundField>
<asp:BoundField DataField="withdraw" HeaderText="Withdraw" DataFormatString="{0:F2}" >
<ItemStyle HorizontalAlign="Right" />
</asp:BoundField>
 
<asp:BoundField DataField="remarks" HeaderText="Remarks" />
</Columns>
</asp:GridView>
 
the code Behind (default.aspx.cs)
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
 
NameDataContext bdc = newNameDataContext();
GridView1.DataSource = bdc.RecentTransactions(
Decimal.Parse(Session["Number"].ToString()));
GridView1.DataBind();
 
Error 4 'NameDataContext' does not contain a definition for 'RecentTransactions' and no extension method 'RecentTransactions' accepting a first argument of type 'NameDataContext' could be found (are you missing a using directive or an assembly reference?) C:\Users\Default.aspx.cs 21 40
 
Is it that i have not referenced an assembly or dll file that is making me have that error of RecentTransactions....thanks
 
I am Grateful

AnswerRe: I am having error on my dbml (InternetTransaction Project) Pin
n.podbielski11-Oct-12 1:04
membern.podbielski11-Oct-12 1:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web02 | 2.8.160426.1 | Last Updated 30 Apr 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid