Click here to Skip to main content
15,891,597 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I have a form with 11 DropDownLists. The main dropdownlist has school names in it. I want to have it where I can select the school from the main dropdownlist and the other 10 dropdownlists will populate with the years from that school. Then when I select what ever year and have that selection to populate the textboxes. Is there a sample code that can help me on this?

C#
using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Drawing;
using System.Text;
using System.Data;
using System.Collections.Generic;
using System.Linq;
using System.Data.SqlClient;
using System.Configuration;
using System.Drawing.Printing;
public partial class SchoolReports : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void DropDownListSchools_SelectedIndexChanged(object sender, EventArgs e)
    {
        SqlConnection con = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["PassConnectionString"].ConnectionString);
        con.Open(); 
    }
    protected void DropDownListCFY1_SelectedIndexChanged(object sender, EventArgs e)
    {

    }
    protected void DropDownListCFY2_SelectedIndexChanged(object sender, EventArgs e)
    {

    }
    protected void DropDownListCFY3_SelectedIndexChanged(object sender, EventArgs e)
    {

    }
    protected void DropDownListCFY4_SelectedIndexChanged(object sender, EventArgs e)
    {

    }
    protected void DropDownListCFY5_SelectedIndexChanged(object sender, EventArgs e)
    {

    }
    protected void DropDownListFY1_SelectedIndexChanged(object sender, EventArgs e)
    {

    }
    protected void DropDownListFY2_SelectedIndexChanged(object sender, EventArgs e)
    {

    }
    protected void DropDownListFY3_SelectedIndexChanged(object sender, EventArgs e)
    {

    }
    protected void DropDownListFY4_SelectedIndexChanged(object sender, EventArgs e)
    {

    }
    protected void DropDownListFY5_SelectedIndexChanged(object sender, EventArgs e)
    {

    }
}
Posted

1 solution

No,there are not such type of code available of what you want.Because your problem domain is completely different from any other projects of the world(it is true for every person). And also no one will try to solve your problem until you hire one of them.
So it's better to learn how to do these things and try yourself.If you get stuck then share your code with us with specific problem.
These will help you to do that things..
http://www.aspdotnet-suresh.com/2010/10/how-to-populate-dropdown-based-on-other.html[^]
http://forums.asp.net/t/1276841.aspx[^]
http://forums.asp.net/t/1431726.aspx[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900