Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6122309
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:53:01+00:00 2026-05-23T15:53:01+00:00

I have a Strange issue that is i have develop a web application in

  • 0

I have a Strange issue that is i have develop a web application in one of the form i am using Gridview control with command button to view the row data.If in Gridview data have only record then link button working fine if it is more than one record not working link buttons i can’t under stand, this is very strange issue to me i have use !Page.IsPostBack also in pageload event,please help me …..

     protected void grdmanageloans_RowCommand(object sender, GridViewCommandEventArgs e)
    {
       if (e.CommandName == "Info") 
        {
            try
        {
            int loanid = Convert.ToInt32(e.CommandArgument);
            Session["Loanid"] = loanid;
            Session["Edit"] = "Edit";
            TabContainer1.ActiveTabIndex = 1;
            Session["TabContainer1"] ="loantab";
            Session["Tabloan"] = "Tabloan";
            Response.Redirect("Mortgageclient.aspx");

        }
        catch { }
                    }
       if (e.CommandName == "Delete")
        {
            try
            {

                int LoanId = Convert.ToInt32(e.CommandArgument);

                var PmtScheduleHistory = from del in mortgageentity.Pmt_Schedule_History where del.Loan.Loan_ID == LoanId select del;
                var LoanPayment = from del in mortgageentity.Payments where del.Loan_ID == LoanId select del;

                if (PmtScheduleHistory.Count() > 0)
                {
                    var DelPmtScheduleHistory = (from del in mortgageentity.Pmt_Schedule_History where del.Loan.Loan_ID == LoanId select del).First();
                    mortgageentity.DeleteObject(DelPmtScheduleHistory);
                    mortgageentity.SaveChanges();
                }
                var Getpayments = from db in mortgageentity.Payments where db.Loan_ID == LoanId select db;
                if (Getpayments.Count() > 0)
                {
                    foreach (var i in Getpayments)
                    {
                        mortgageentity.DeleteObject(i);
                        mortgageentity.SaveChanges();
                    }
                } 

                if (LoanPayment.Count() > 0)
                {
                    var DelPmtScheduleHistory = (from del in mortgageentity.Payments where del.Loan_ID == LoanId select del.Payment_Status.PaymentStatus_ID).First();
                    mortgageentity.DeleteObject(DelPmtScheduleHistory);
                    mortgageentity.SaveChanges();
                }

                var deletedata = (from del in mortgageentity.Loans where del.Loan_ID == LoanId select del).First();
                mortgageentity.DeleteObject(deletedata);
                mortgageentity.SaveChanges();
                BindData();
            }
            catch { }
        }

        if (e.CommandName == "AddNewloan")
        {
            Session["Addnewloan"] = "Addloan";
            Response.Redirect("Information.aspx");
        }
    }

Here is my .aspx page

     <asp:GridView ID="grdmanageloans" runat="server" AutoGenerateColumns="False" AllowSorting="True"
                                                            GridLines="Both" PageSize="10" AllowPaging="true" OnRowCommand="grdmanageloans_RowCommand"
                                                            OnSelectedIndexChanged="grdmanageloans_SelectedIndexChanged" ShowFooter="true"
                                                            OnPageIndexChanging="grdmanageloans_PageIndexChanging" OnRowDataBound="grdmanageloans_Rowdatabound">
                                                            <AlternatingRowStyle BackColor="#F3F9FB" />
                                                            <RowStyle BackColor="#FEFEFE" VerticalAlign="Top" />
                                                            <HeaderStyle BackColor="#F3F9FB" />
                                                            <FooterStyle BackColor="#F3F9FB" />
                                                            <RowStyle Wrap="False" />
                                                            <HeaderStyle ForeColor="#1F476F" />
                                                            <Columns>
                                                                <asp:TemplateField HeaderText="LoanID" Visible="true">
                                                                    <ItemStyle HorizontalAlign="Center" />
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="lblloanid" runat="server" Text='<%# Bind("Loan_ID") %>'></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Loan Number">
                                                                    <ItemStyle HorizontalAlign="Center" />
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="lblLoanNumber" runat="server" Text='<%# Bind("LoanNumber") %>'></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Month Pay Amt" HeaderStyle-Wrap="false">
                                                                    <ItemStyle HorizontalAlign="Center" />
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="lblMonthPayAmt" runat="server" Text='<%#Getammount(Eval("MonthPayAmt","{0:F2}")) %>'></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Address">
                                                                    <ItemStyle HorizontalAlign="Center" />
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="lblpropaddress" runat="server" Text='<%# Bind("PropAddress") %>'></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="City">
                                                                    <ItemStyle HorizontalAlign="Center" />
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="lblpropcity" runat="server" Text='<%# Bind("PropCity") %>'></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="State">
                                                                    <ItemStyle HorizontalAlign="Center" />
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="lblpropstate" runat="server" Text='<%# Bind("PropState") %>'></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="ClientID" Visible="false">
                                                                    <ItemStyle HorizontalAlign="Center" />
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="lblclientid" runat="server" Text='<%# Bind("Client_ID") %>'></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField>
                                                                    <ItemStyle HorizontalAlign="Center" />
                                                                    <ItemTemplate>


                                                                      <asp:LinkButton ID="lnkeinfo" runat="server" CausesValidation="false" CommandName="Info"
                                                                            CommandArgument='<%#Eval("Loan_ID")%>'>Information</asp:LinkButton>
                                                                    </ItemTemplate>
                                                               </asp:TemplateField>
                                                            </Columns>
                                                        </asp:GridView>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T15:53:02+00:00Added an answer on May 23, 2026 at 3:53 pm

    Try this:

     <asp:LinkButton ID="lnkeinfo" runat="server" CausesValidation="false" CommandName="Info"
                                                                                CommandArgument='<%# Bind("Loan_ID") %>'>Information</asp:LinkButton>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a strange issue: I am using SPContext.Current.Web in a .aspx page, but
I have this strange issue with my web app. You see, I'm using jQuery
I have strange issue. My application have multiple activitys, on one activity is setting
We have a strange issue with running an Facebook IFrame application (using MVC 2).
I have a strange issue that has arisen recently: Whenever I enter text, even
I am trying to debug a strange issue with users that have LogMeIn installed.
I am facing a very strange issue. I have a SharePoint webpart that displays
I have a strange, sporadic issue. I have stored procedure that returns back 5
I have a really strange issue. I am working on a Java SWING application
I have a strange issue that I'm not too sure on how to fix

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.