Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Column Not Found
Message
De
05/12/2014 02:27:11
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Column Not Found
Versions des environnements
Environment:
ASP.NET
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01611884
Message ID:
01611884
Vues:
30
At learning Stage I have a problem in following code;

SqlDataSource2.FilterExpression = "fld1 = " + TextBox1.Text; is giving column not error
public partial class OffPage : System.Web.UI.Page
{
    SqlConnection con3 = new SqlConnection(ConfigurationManager.ConnectionStrings["LoginCS"].ConnectionString);
    SqlCommand cmd3 = new SqlCommand();

    protected void Page_Load(object sender, EventArgs e)
    {
       con3.Open();
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        if (Convert.ToInt32(RadioButtonList1.SelectedValue) == 0)
        {
            TextBox1.Text = "Pending";
            SqlDataSource2.FilterExpression = "fld1 = " + TextBox1.Text;
        }
        if (Convert.ToInt32(RadioButtonList1.SelectedValue) == 1)
        {
            TextBox1.Text = "FWD";
            SqlDataSource2.FilterExpression = "fld1 = " + TextBox1.Text;
        }
        
    }
 }
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform