Click here to Skip to main content
15,898,134 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Problem with gridview Pin
Anshumas11-Jan-09 22:22
Anshumas11-Jan-09 22:22 
AnswerRe: Problem with gridview Pin
goodideadave13-Jan-09 13:51
goodideadave13-Jan-09 13:51 
QuestionChanging the Language of windows through asp.net Pin
Mr.Sam11-Jan-09 7:08
Mr.Sam11-Jan-09 7:08 
AnswerRe: Changing the Language of windows through asp.net Pin
Christian Graus11-Jan-09 16:39
protectorChristian Graus11-Jan-09 16:39 
GeneralRe: Changing the Language of windows through asp.net Pin
Not Active11-Jan-09 16:58
mentorNot Active11-Jan-09 16:58 
GeneralRe: Changing the Language of windows through asp.net Pin
Christian Graus12-Jan-09 0:08
protectorChristian Graus12-Jan-09 0:08 
QuestionHow to handle event in two user control dropdown list. Pin
Rajesh_K_Sharma11-Jan-09 2:06
Rajesh_K_Sharma11-Jan-09 2:06 
AnswerRe: How to handle event in two user control dropdown list. Pin
Aman Bhullar11-Jan-09 4:06
Aman Bhullar11-Jan-09 4:06 
I suggest you to make one user control for Country/state selection

In that case you can accomlpish the task as

void ddlCountry_SelectedIndexChanged(object sender, EventArgs e)
{
 switch (ddlCountry.SelectedValue)
 {
  case "0":
   ddlState.Items.Add("Delhi");
   ddlState.Items.Add("MP");
   break;
  case "1":
   ddlState.Items.Add("Sunae");
   ddlState.Items.Add("Seoul");
   break;
  default:
   ddlState.Items.Add("Select");
   break;
 }
}


In case you want to continue in the same manner as you are doing then try out the following

1. Create a public variable in state.ascx.cs as
public int CountryId = 0;

2. In your function
void ddlCountry_SelectedIndexChanged(object sender, EventArgs e)
{
//Add lines
State objState = (State)FindControl("State1");
objState.intCountryId = ddlCountry.selectedvalue
}

3. In Page load event of state.ascx, check the value of
intCountryid and fill the dropdown accordingly.
GeneralRe: How to handle event in two user control dropdown list. Pin
Not Active11-Jan-09 4:39
mentorNot Active11-Jan-09 4:39 
GeneralRe: How to handle event in two user control dropdown list. Pin
Christian Graus11-Jan-09 4:51
protectorChristian Graus11-Jan-09 4:51 
GeneralRe: How to handle event in two user control dropdown list. Pin
Aman Bhullar11-Jan-09 5:54
Aman Bhullar11-Jan-09 5:54 
GeneralRe: How to handle event in two user control dropdown list. Pin
Rajesh_K_Sharma11-Jan-09 6:41
Rajesh_K_Sharma11-Jan-09 6:41 
GeneralRe: How to handle event in two user control dropdown list. Pin
Not Active11-Jan-09 8:18
mentorNot Active11-Jan-09 8:18 
GeneralRe: How to handle event in two user control dropdown list. Pin
Not Active11-Jan-09 8:15
mentorNot Active11-Jan-09 8:15 
GeneralRe: How to handle event in two user control dropdown list. Pin
Aman Bhullar11-Jan-09 17:49
Aman Bhullar11-Jan-09 17:49 
GeneralRe: How to handle event in two user control dropdown list. Pin
Not Active11-Jan-09 18:13
mentorNot Active11-Jan-09 18:13 
AnswerRe: How to handle event in two user control dropdown list. Pin
Not Active11-Jan-09 4:10
mentorNot Active11-Jan-09 4:10 
AnswerRe: How to handle event in two user control dropdown list. Pin
Anshumas11-Jan-09 22:43
Anshumas11-Jan-09 22:43 
Question[Message Deleted] Pin
Rohan Rajpoot11-Jan-09 0:36
Rohan Rajpoot11-Jan-09 0:36 
AnswerRe: datagrid problem! Pin
Abhijit Jana11-Jan-09 1:01
professionalAbhijit Jana11-Jan-09 1:01 
AnswerRe: [Message Deleted] Pin
Abhijit Jana11-Jan-09 1:11
professionalAbhijit Jana11-Jan-09 1:11 
QuestionIFrame Problem Pin
ais0711-Jan-09 0:15
ais0711-Jan-09 0:15 
AnswerRe: IFrame Problem Pin
Aman Bhullar11-Jan-09 0:58
Aman Bhullar11-Jan-09 0:58 
AnswerRe: IFrame Problem Pin
Abhijit Jana11-Jan-09 0:58
professionalAbhijit Jana11-Jan-09 0:58 
QuestionAlignment problem Pin
reogeo200810-Jan-09 21:12
reogeo200810-Jan-09 21:12 

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.