shmulik hazan
shmulik hazan

Reputation: 193

Detecting DropDownList (Statement Issue)

i trying to use DropDownList in code behind but i get an error - the visual studio dont recognized the dropdownlist. enter image description here

I was trying to put the "System.Web.UI.WebControls.DropDownList" statment but nothing changed.

This is my current statment:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Data.SqlClient;
using System.Web.Configuration;
using System.Text;
using System.Configuration;

Upvotes: 0

Views: 25

Answers (3)

Dhruv Pandya
Dhruv Pandya

Reputation: 67

You need to add one namespace

using System.Web.UI.WebControls;

Upvotes: 0

Mudassir Hasan
Mudassir Hasan

Reputation: 28741

Add namespace below

using System.Web.UI.WebControls;

If this still does not work ,try rebuilding the project. In Visual Studio , go to Build menu and select Rebuild option.

Upvotes: 0

Aftab Ahmed
Aftab Ahmed

Reputation: 1737

You are missing these two namespaces using System.Web.UI; using System.Web.UI.WebControls; if you are using ASP.NET try this code hope it will help.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public void loadSuppliers(DropDownList ddl)
{

}

Upvotes: 3

Related Questions