Click here to Skip to main content
15,905,686 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionAsp.net and Webfocus reporting Pin
Mohamed Arif24-Mar-07 17:30
Mohamed Arif24-Mar-07 17:30 
QuestionNested Query Results (DataReader woes) Pin
GregStevens24-Mar-07 14:03
GregStevens24-Mar-07 14:03 
AnswerRe: Nested Query Results (DataReader woes) Pin
kubben24-Mar-07 14:13
kubben24-Mar-07 14:13 
GeneralRe: Nested Query Results (DataReader woes) Pin
GregStevens24-Mar-07 14:22
GregStevens24-Mar-07 14:22 
GeneralRe: Nested Query Results (DataReader woes) Pin
kubben24-Mar-07 14:36
kubben24-Mar-07 14:36 
GeneralRe: Nested Query Results (DataReader woes) Pin
GregStevens24-Mar-07 15:40
GregStevens24-Mar-07 15:40 
AnswerRe: Nested Query Results (DataReader woes) Pin
Jesse Squire25-Mar-07 1:35
Jesse Squire25-Mar-07 1:35 
QuestionArrayList Resetting When Adding Form Controls Pin
redfish3424-Mar-07 9:01
redfish3424-Mar-07 9:01 
Below is test code to replicate the problem. I trying to add form controls to an ArrayList. In LinkButton1_Click, two textbox controls are added to ArrayList. No problem. But when i break this code into two separate LinkButtons, only one textbox will ever be added to ArrayList when both link buttons are clicked. The last textbox added will overwrite the first one added. The ArrayList.Add should not behave like this. What is going on? How should i make this work?


To store they control i am using an ArrayList.

public partial class Builder_Generator : System.Web.UI.Page
{
ArrayList _controls = new ArrayList();
TextBox _textBox = null;

protected void LinkButton1_Click(object sender, EventArgs e)
{
_textBox = new TextBox();
_textBox.Text = "first";
_textBox.ID = "first_Textbox";
Form_PlaceHolder.Controls.Add(_textBox);

_textBox = new TextBox();
_textBox.Text = "second";
_textBox.ID = "second_Textbox";
Form_PlaceHolder.Controls.Add(_textBox);
}


protected void LinkButton2_Click(object sender, EventArgs e)
{
_textBox = new TextBox();
_textBox.Text = "first";
_textBox.ID = "first_Textbox";
_controls.Add(_textBox);

}
protected void LinkButton3_Click(object sender, EventArgs e)
{
_textBox = new TextBox();
_textBox.Text = "second";
_textBox.ID = "second_Textbox";
_controls.Add(_textBox);
}
}
Questiondatagrid sorting Pin
vsk84200524-Mar-07 8:24
vsk84200524-Mar-07 8:24 
AnswerRe: datagrid sorting Pin
kubben24-Mar-07 13:59
kubben24-Mar-07 13:59 
AnswerRe: datagrid sorting Pin
Rahithi24-Mar-07 19:52
Rahithi24-Mar-07 19:52 
GeneralRe: datagrid sorting Pin
siddisagar25-Mar-07 18:40
siddisagar25-Mar-07 18:40 
QuestionDeployment of asp pages on IIS Pin
MinhajuddinK24-Mar-07 7:34
MinhajuddinK24-Mar-07 7:34 
AnswerRe: Deployment of asp pages on IIS Pin
Christian Graus24-Mar-07 7:40
protectorChristian Graus24-Mar-07 7:40 
QuestionRe: Deployment of asp pages on IIS [modified] Pin
MinhajuddinK24-Mar-07 7:46
MinhajuddinK24-Mar-07 7:46 
GeneralRe: Deployment of asp pages on IIS Pin
MinhajuddinK24-Mar-07 8:09
MinhajuddinK24-Mar-07 8:09 
AnswerRe: Deployment of asp pages on IIS Pin
GregStevens25-Mar-07 16:42
GregStevens25-Mar-07 16:42 
QuestionRe: Deployment of asp pages on IIS Pin
MinhajuddinK25-Mar-07 17:05
MinhajuddinK25-Mar-07 17:05 
QuestionPassing windows authentication between different sites [modified] Pin
vaibhav_vartak24-Mar-07 5:43
vaibhav_vartak24-Mar-07 5:43 
QuestionResponse.Redirect Question??? Pin
Tkml23624-Mar-07 2:53
Tkml23624-Mar-07 2:53 
QuestionAdding a record to a datagrid Pin
gauthee24-Mar-07 2:32
gauthee24-Mar-07 2:32 
AnswerRe: Adding a record to a datagrid Pin
kubben24-Mar-07 2:35
kubben24-Mar-07 2:35 
GeneralRe: Adding a record to a datagrid Pin
gauthee24-Mar-07 2:40
gauthee24-Mar-07 2:40 
GeneralRe: Adding a record to a datagrid Pin
kubben24-Mar-07 2:43
kubben24-Mar-07 2:43 
GeneralRe: Adding a record to a datagrid Pin
GregStevens24-Mar-07 14:17
GregStevens24-Mar-07 14:17 

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.