Skip to content

Input string was not in a correct format.

Sheikh parvaz

Sheikh parvaz

Asked Nov 25, 2012, 12:15 AM EST1 answer
Share
LinkedInX
the below code has some issue with conversion, kidly help.


C#
ticketid = Convert.ToInt32(Request.QueryString["TicketID"].ToString());
            string countresolved = "Select Count(CurrentStatus) From Ticket Where CurrentStatus='Resolved' and TicketId = ticketid";
            Int32.TryParse(countresolved, out countresolvedint);
            countresolvedint = Convert.ToInt32(countresolved);
            if (Convert.ToInt32(countresolved)==1)
            {
                lblIssueResolved.Visible = true;
                btnIssueResolved.Visible = false;

            }

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • Sheikh parvaz
    0
    I got it you have to write '"+ticketid+"' as local variable in sql query.
    0