Click here to Skip to main content
15,903,175 members
Home / Discussions / C#
   

C#

 
AnswerRe: how to call exe file from web page Pin
Manas Bhardwaj27-Jun-07 22:06
professionalManas Bhardwaj27-Jun-07 22:06 
AnswerRe: how to call exe file from web page Pin
Vasudevan Deepak Kumar27-Jun-07 22:46
Vasudevan Deepak Kumar27-Jun-07 22:46 
QuestionHow to declare an array in c#? Pin
help as an alias27-Jun-07 21:12
help as an alias27-Jun-07 21:12 
AnswerRe: How to declare an array in c#? Pin
Stu Richardson27-Jun-07 21:36
Stu Richardson27-Jun-07 21:36 
AnswerRe: How to declare an array in c#? Pin
Manas Bhardwaj27-Jun-07 22:09
professionalManas Bhardwaj27-Jun-07 22:09 
AnswerRe: How to declare an array in c#? Pin
Luc Pattyn27-Jun-07 22:17
sitebuilderLuc Pattyn27-Jun-07 22:17 
AnswerRe: How to declare an array in c#? Pin
Chintan.Desai28-Jun-07 0:55
Chintan.Desai28-Jun-07 0:55 
Questiondynamic control (c# ASP.net) Pin
hhems27-Jun-07 20:53
hhems27-Jun-07 20:53 
hi
I have created one method createdropdown()in that i had create one dynamic dropdownlist and in selectindexchange of that dropdownlist i had created another dynamic dropdownlist and again selectedindexchange of the second dropdown .
but when i run this code it will call first selectedindexchange when i select the dropdownvalue but it want call second selectedindexchange.
i had done autopostBack=true for both the dropdownlist.
Please Help It is some urgent Task that i have to complet.
in the below ddl_SelectedIndexChanged() is call but ddl2____SelectedIndexChanged is not fired.....?

// Add DropDownList Control to Placeholder
private void CreateDropDownBoxes()
{
//int counter= Convert[ViewState ("counter"),Int32];
for (int counter = 0; counter <= NumberOfControls; counter++)
{
DropDownList ddl = new DropDownList();
ddl.ID = "DropDownList_ID" + (counter + 1).ToString();

ddl.AutoPostBack = true;
ddl.AppendDataBoundItems = true;
ddl.SelectedIndexChanged += new EventHandler(ddl_SelectedIndexChanged);
DataTable dt = new DataTable();
dt = getdata_workspace();
ddl.DataSource = dt;
ddl.DataTextField = "displayedname";
ddl.DataValueField = "id";
ddl.DataBind();

phDropDownLists.Controls.Add(ddl);
phDropDownLists.Controls.Add(new LiteralControl("


"));
}
}
public void ddl_SelectedIndexChanged(object sender, EventArgs e)
{
int n = this.NumberOfControls;
for (int i = 0; i < n; i++)
{
SqlConnection conn = new SqlConnection(connStr);
string boxName = "DropDownList_ID" + (i + 1).ToString();
DropDownList ddl2_ = phDropDownLists.FindControl(boxName) as DropDownList;

DropDownList ddl2___ = new DropDownList();
ddl2___.ID = "DropDownList__" + (i + 1).ToString();
ddl2___.AutoPostBack = true;
ddl2___.AppendDataBoundItems = true;
ddl2___.EnableViewState = true;

SqlCommand cmd = new SqlCommand("select * from unit where workspaceid='" + ddl2_.SelectedValue + "'", conn);
conn.Open();
SqlDataReader dr = cmd.ExecuteReader();
while (dr.Read())
{
ddl2___.Items.Add(dr.GetString(2));
}

// ddl2___.EnableViewState = true;
ddl2___.SelectedIndexChanged += new EventHandler(ddl2____SelectedIndexChanged);
ddl2___.DataTextField = "displayedname";
ddl2___.DataValueField = "id";
phTextBoxes.Controls.Add(ddl2___);
phTextBoxes.Controls.Add(new LiteralControl("


"));

}

// throw new Exception("The method or operation is not implemented.");
}
void ddl2____SelectedIndexChanged(object sender, EventArgs e)
{
int n = this.NumberOfControls;
for (int i = 0; i < n; i++)
{
SqlConnection conn = new SqlConnection(connStr);
string boxName = "DropDownList__" + (i + 1).ToString();
DropDownList ddl2_ = phTextBoxes.FindControl(boxName) as DropDownList;
DropDownList ddl2___ = new DropDownList();
ddl2___.SelectedIndexChanged += new EventHandler(ddl2____SelectedIndexChanged);
ddl2_.ToolTip = "ddl2";
SqlCommand cmd = new SqlCommand("select * from unitoperation where workspaceid='" + ddl2_.SelectedValue + "'", conn);
conn.Open();
SqlDataReader dr = cmd.ExecuteReader();
while (dr.Read())
{
ddl2___.Items.Add(dr.GetString(3));
}
phdropdown3.Controls.Add(ddl2___);
}
}


Please Help ...Help...
AnswerRe: dynamic control (c# ASP.net) Pin
Chintan.Desai28-Jun-07 1:03
Chintan.Desai28-Jun-07 1:03 
QuestionDeploying the addin Pin
Ram Krishna Wagle27-Jun-07 20:27
Ram Krishna Wagle27-Jun-07 20:27 
QuestionProblem with using the CollectionEditor class for user control in C#. Pin
Biju VA27-Jun-07 20:08
professionalBiju VA27-Jun-07 20:08 
QuestionPreventing method access in derived class. Pin
Diana Fernandez27-Jun-07 19:17
Diana Fernandez27-Jun-07 19:17 
AnswerRe: Preventing method access in derived class. Pin
Christian Graus27-Jun-07 19:34
protectorChristian Graus27-Jun-07 19:34 
AnswerRe: Preventing method access in derived class. Pin
stancrm27-Jun-07 19:34
stancrm27-Jun-07 19:34 
AnswerRe: Preventing method access in derived class. Pin
Sathesh Sakthivel27-Jun-07 20:05
Sathesh Sakthivel27-Jun-07 20:05 
AnswerRe: Preventing method access in derived class. Pin
Diana Fernandez27-Jun-07 20:09
Diana Fernandez27-Jun-07 20:09 
GeneralRe: Preventing method access in derived class. Pin
Martin#27-Jun-07 20:19
Martin#27-Jun-07 20:19 
GeneralRe: Preventing method access in derived class. Pin
Christian Graus27-Jun-07 20:34
protectorChristian Graus27-Jun-07 20:34 
GeneralRe: Preventing method access in derived class. Pin
Martin#27-Jun-07 20:38
Martin#27-Jun-07 20:38 
GeneralRe: Preventing method access in derived class. Pin
Christian Graus27-Jun-07 20:36
protectorChristian Graus27-Jun-07 20:36 
GeneralRe: Preventing method access in derived class. Pin
Urs Enzler27-Jun-07 22:39
Urs Enzler27-Jun-07 22:39 
QuestionHow to implement an aspect factory Pin
rameshbhojan27-Jun-07 19:10
rameshbhojan27-Jun-07 19:10 
AnswerRe: How to implement an aspect factory Pin
Christian Graus27-Jun-07 19:36
protectorChristian Graus27-Jun-07 19:36 
AnswerRe: How to implement an aspect factory Pin
Sathesh Sakthivel27-Jun-07 20:06
Sathesh Sakthivel27-Jun-07 20:06 
QuestionTimer+web form Pin
razanabanu27-Jun-07 18:44
razanabanu27-Jun-07 18:44 

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.