#1
  1. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Oct 2012
    Posts
    2
    Rep Power
    0

    I am having error on my dbml (InternetTransaction Project)


    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
  2. #2
  3. Contributing User
    ASP Skiller (1500 - 1999 posts)

    Join Date
    Aug 2008
    Location
    united state
    Posts
    1,562
    Rep Power
    342
    Hi,

    as per the error says. RecentTransactions() function is not able to find the method on the page.
    have you check the what response your getting around this , while debugging the code.
    bdc.RecentTransactions(Decimal.Parse(Session["Number"].ToString()));
    if you found this post is useful click Give Rep button (bottom side on this reply ) and agree

    Andriod KitKat
    Jquery Shake Effect ,

    Thank You,
    KiranK
  4. #3
  5. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Oct 2012
    Posts
    2
    Rep Power
    0
    Compiler Error Message: CS1061: '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?)

    Source Error:

    Line 21: {
    Line 22: NameDataContext bdc = new BankDataContext();
    Line 23: GridView1.DataSource = bdc.RecentTransactions(
    Line 24: Decimal.Parse(Session["Number"].ToString()));
    Line 25: GridView1.DataBind();

    the error is in Line: 23

    Kindly assist me I don't if i am missing an assembly..thanks

Similar Threads

  1. Easy (C) Project (Help)
    By oct240 in forum .NET Development
    Replies: 2
    Last Post: October 11th, 2012, 05:34 PM
  2. Viewing my project from another computer
    By shuyin101 in forum ASP Development
    Replies: 2
    Last Post: October 5th, 2012, 07:57 AM
  3. Replies: 3
    Last Post: September 27th, 2012, 12:41 AM
  4. Need an Email WEBSITE C# ASP.NET project
    By aidayi in forum Programmers for Hire
    Replies: 2
    Last Post: January 3rd, 2012, 06:41 AM
  5. HTTP 500.100 - Internal Server Error - ASP error
    By satsteve in forum Microsoft IIS
    Replies: 12
    Last Post: October 20th, 2004, 04:56 PM

IMN logo majestic logo threadwatch logo seochat tools logo