Click here to Skip to main content
16,004,944 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: How to access gridview editing row element value in a class function? Pin
minhpc_bk4-Oct-06 14:47
minhpc_bk4-Oct-06 14:47 
QuestionWhy it doesn't show detail error ... Pin
devboycpp2-Oct-06 4:12
devboycpp2-Oct-06 4:12 
AnswerRe: Why it doesn't show detail error ... Pin
morteza572-Oct-06 12:09
morteza572-Oct-06 12:09 
QuestionDropDownList in property window help please Pin
StonePit2-Oct-06 3:59
StonePit2-Oct-06 3:59 
AnswerRe: DropDownList in property window help please Pin
StonePit2-Oct-06 4:31
StonePit2-Oct-06 4:31 
QuestionAccessing WebPartZone child controls from JavaScript Pin
Faizal Rub2-Oct-06 2:17
Faizal Rub2-Oct-06 2:17 
QuestionDetailsView in asp.net Pin
S Ravindra M2-Oct-06 1:59
S Ravindra M2-Oct-06 1:59 
AnswerRe: DetailsView in asp.net Pin
Sathesh Sakthivel2-Oct-06 18:43
Sathesh Sakthivel2-Oct-06 18:43 
Hi,

here i have described it for two dropdown list.

Like wise try for 3 drop downlist.


create two dropdownlist as "ddlParent" and "ddlChild".

Populate the "ddlParent" using

if(!Page.IsPostBack)
{

SqlDataAdapter ad = new SqlDataAdapter("SELECT PersonID FROM Person",myConnection);

DataSet ds = new DataSet();

ad.Fill(ds,"Person");

ddlParent.DataSource = ds;

ddlParent.DataTextField = "PersonID";

ddlParent.DataValueField = "PersonID";

ddlParent.DataBind();


}
Now in the selectedIndexChanged event of the "ddlParent" you will implement the code that will fill the "ddlChild".

private void ddlParent_SelectedIndexChanged(object sender, System.EventArgs e)
{

int personID = Convert.ToInt32(ddlParent.SelectedItem.Value);

string query = "SELECT PhoneNumber,PhoneID FROM Phone WHERE PersonID = "+personID;

SqlDataAdapter ad = new SqlDataAdapter(query,myConnection);

DataSet ds = new DataSet();

ad.Fill(ds,"Phone");

ddlChild.DataSource = ds;

ddlChild.DataTextField = "PhoneNumber";

ddlChild.DataValueField = "PhoneID";

ddlChild.DataBind();

}

Hope it will give an idea.

Happy Coding,


With Regards

Satips

Questionplease help. it is urgent. Pin
lavanya_satheesh2-Oct-06 1:57
lavanya_satheesh2-Oct-06 1:57 
AnswerRe: please help. it is urgent. Pin
Colin Angus Mackay2-Oct-06 5:21
Colin Angus Mackay2-Oct-06 5:21 
AnswerRe: please help. it is urgent. Pin
GaryWoodfine 2-Oct-06 11:31
professionalGaryWoodfine 2-Oct-06 11:31 
AnswerRe: please help. it is urgent. Pin
saravanan054-Oct-06 12:02
saravanan054-Oct-06 12:02 
QuestionBring window to front Pin
munklefish2-Oct-06 1:43
munklefish2-Oct-06 1:43 
AnswerRe: Bring window to front Pin
Arjune7-Oct-06 5:42
Arjune7-Oct-06 5:42 
QuestionTreeView Control Using Javascript ? Pin
Kamal.Afridi2-Oct-06 1:05
Kamal.Afridi2-Oct-06 1:05 
Questionneed help wit creating dynamic links Pin
neodeaths1-Oct-06 23:25
neodeaths1-Oct-06 23:25 
AnswerRe: need help wit creating dynamic links Pin
CWIZO2-Oct-06 0:16
CWIZO2-Oct-06 0:16 
AnswerRe: need help wit creating dynamic links Pin
lavanya_satheesh2-Oct-06 2:00
lavanya_satheesh2-Oct-06 2:00 
AnswerRe: need help wit creating dynamic links Pin
Exelioindia2-Oct-06 19:57
Exelioindia2-Oct-06 19:57 
GeneralRe: need help wit creating dynamic links Pin
neodeaths3-Oct-06 2:31
neodeaths3-Oct-06 2:31 
Questionget information of a web page that use frame Pin
aligatojohn1-Oct-06 22:41
aligatojohn1-Oct-06 22:41 
QuestionCan logon page be skipped if form authentication is used? Pin
Arjune1-Oct-06 22:10
Arjune1-Oct-06 22:10 
AnswerRe: Can logon page be skipped if form authentication is used? Pin
nguyenvhn1-Oct-06 22:27
nguyenvhn1-Oct-06 22:27 
GeneralRe: Can logon page be skipped if form authentication is used? Pin
sanju02762-Oct-06 7:27
sanju02762-Oct-06 7:27 
Questionbiult a tree with database Pin
ptvce1-Oct-06 22:09
ptvce1-Oct-06 22:09 

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.