In a page i use 6 webcontrols, 2 Dropdownlist,2 Textbox 1 Link button and i Button. In this 1 dropdown and text box visible property is false,if i select a value in 1st dropdown list,then only those both will visible... but if i select a value in 1st drpdwnlst it will bind datas into 2nd drpdwnlst. and if i press a button(no data's in onclick event) then that 2nd dropdwnlst get datas from db....
the same thing happened in link button also....please help me to resolve this...
Displays Object doesn't support this property or method -- Error..... but everything i place correctly.
please help me to resolve this.
Loading

Posted Jun 1, 2011, 3:35 AM EDT
Periyannan G43 reputationPosted Jun 1, 2011, 3:42 AM EDT
*Select Qualification
:
*Speclization
:
In .cs page:
{
SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["jobconnection"].ConnectionString);
protected void Page_Load(object sender, EventArgs e)
{ if(!IsPostBack)
{
if (Session.Count == 0)
{
Response.Redirect("Emp_login.aspx");
}
else
{
logname.Text = "Welcome:" + Session["name"].ToString();
logname.Visible = true;
loglink.Visible = true;
}
}
}
protected void Sub_form(object sender, EventArgs e)
{
}
protected void qual_tye(object sender, EventArgs e)
{
if (dropdown.SelectedItem.Text == "Diploma")
{
spec.Visible = true;
}
else if (dropdown.SelectedItem.Text == "ITI")
{
spec.Visible = true;
}
else if (dropdown.SelectedItem.Text == "Others")
{
spec.Visible = true;
}
else
{
SqlCommand cmd = new SqlCommand("sp_degree", connection);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@t_Qualifi", SqlDbType.VarChar).Value = dropdown.SelectedItem.Text.ToString();
cmd.Connection.Open();
SqlDataAdapter sda = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
sda.Fill(dt);
cmd.Connection.Close();
deg.DataSource = dt;
deg.DataTextField = "Degree";
deg.DataBind();
qual.Visible = true;
spec.Visible = true;
}
}
protected void Click_Logout(object sender, EventArgs e)-----------> This is that link button onclick event
{
Session.Abandon();
Session.Clear();
}
}
Posted Jun 1, 2011, 4:09 AM EDT
When you're getting the error ?
Periyannan G43 reputationPosted Jun 1, 2011, 5:08 AM EDT
Suthish NairRank #92 · 22.8K reputationPosted Jun 1, 2011, 11:13 AM EDT
Periyannan G43 reputationPosted Jun 28, 2011, 12:58 AM EDT