Click here to Skip to main content
15,888,195 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Global.ajax Pin
Abhijit Jana23-Sep-09 20:54
professionalAbhijit Jana23-Sep-09 20:54 
GeneralRe: Global.ajax Pin
sris 42623-Sep-09 22:06
sris 42623-Sep-09 22:06 
AnswerRe: Global.ajax [modified] Pin
Nisha Agrawal24-Sep-09 3:19
Nisha Agrawal24-Sep-09 3:19 
GeneralRe: Global.ajax Pin
Nisha Agrawal23-Sep-09 21:18
Nisha Agrawal23-Sep-09 21:18 
AnswerRe: Global.ajax Pin
Abhijit Jana23-Sep-09 20:04
professionalAbhijit Jana23-Sep-09 20:04 
QuestionDropDownlist Load Pin
Illegal Operation23-Sep-09 17:42
Illegal Operation23-Sep-09 17:42 
AnswerRe: DropDownlist Load Pin
Steve Echols23-Sep-09 17:50
Steve Echols23-Sep-09 17:50 
GeneralRe: DropDownlist Load Pin
Illegal Operation23-Sep-09 17:55
Illegal Operation23-Sep-09 17:55 
here is the code:

Variables to check DropDownList State and to get the IndustryId for SubIndustry:

bool LoadSubIndustries = true;
public int IndustryId { get; set; }


Page_Load:

protected void Page_Load(object sender, EventArgs e)
{
    if (!Page.IsPostBack)
    {
        Populate_Industry();
    }

    LoadSubIndustries = false;
}


The Populate Methods:

private void Populate_SubIndustry()
{
    DataSet dsSubIndustries = lookupManager.GetSubIndsutryByIndustryId(IndustryId);

    ddlSubIndustry.DataSource = dsSubIndustries.Tables["Lookup_SubIndustry"].DefaultView;
    ddlSubIndustry.DataValueField = "Id";
    ddlSubIndustry.DataTextField = "SubIndustry";

    ddlSubIndustry.DataBind();
}

private void Populate_Industry()
{
    DataSet dsIndustries = lookupManager.GetIndustries();

    ddlIndustry.DataSource = dsIndustries.Tables["Lookup_Industry"].DefaultView;
    ddlIndustry.DataValueField = "Id";
    ddlIndustry.DataTextField = "Industry";

    ddlIndustry.DataBind();
}


SelectedIndex_Changed method:

protected void ddlIndustry_SelectedIndexChanged(object sender, EventArgs e)
{
    if (LoadSubIndustries == false)
    {
        IndustryId = (int.Parse(ddlIndustry.SelectedValue.ToString()));
        Populate_SubIndustry();
    }
}


Illegal Operation

GeneralRe: DropDownlist Load Pin
Illegal Operation23-Sep-09 18:01
Illegal Operation23-Sep-09 18:01 
GeneralRe: DropDownlist Load Pin
Steve Echols23-Sep-09 18:05
Steve Echols23-Sep-09 18:05 
GeneralRe: DropDownlist Load Pin
Steve Echols23-Sep-09 18:04
Steve Echols23-Sep-09 18:04 
QuestionASP.NET with AD Pin
Socheat.Net23-Sep-09 17:02
Socheat.Net23-Sep-09 17:02 
AnswerRe: ASP.NET with AD Pin
Abhijit Jana23-Sep-09 17:15
professionalAbhijit Jana23-Sep-09 17:15 
GeneralRe: ASP.NET with AD Pin
Socheat.Net23-Sep-09 17:53
Socheat.Net23-Sep-09 17:53 
AnswerRe: ASP.NET with AD Pin
Arun Jacob23-Sep-09 18:46
Arun Jacob23-Sep-09 18:46 
QuestionAPS.NET Pin
mamix6523-Sep-09 13:24
mamix6523-Sep-09 13:24 
AnswerRe: APS.NET Pin
Not Active23-Sep-09 13:36
mentorNot Active23-Sep-09 13:36 
GeneralRe: APS.NET Pin
N a v a n e e t h23-Sep-09 15:29
N a v a n e e t h23-Sep-09 15:29 
GeneralRe: APS.NET Pin
Christian Graus23-Sep-09 17:14
protectorChristian Graus23-Sep-09 17:14 
GeneralRe: APS.NET Pin
Not Active24-Sep-09 1:02
mentorNot Active24-Sep-09 1:02 
AnswerRe: APS.NET Pin
Christian Graus23-Sep-09 15:28
protectorChristian Graus23-Sep-09 15:28 
Questiondata access Pin
raquidd2223-Sep-09 11:26
raquidd2223-Sep-09 11:26 
AnswerRe: data access Pin
Abhishek Sur23-Sep-09 12:17
professionalAbhishek Sur23-Sep-09 12:17 
GeneralRe: data access Pin
N a v a n e e t h23-Sep-09 15:47
N a v a n e e t h23-Sep-09 15:47 
GeneralRe: data access Pin
Abhishek Sur23-Sep-09 23:28
professionalAbhishek Sur23-Sep-09 23:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.