textbox values arent showing up?

A

Andy B

I have this code:
protected void EditEventsWizard_NextButtonClick(object sender,
WizardNavigationEventArgs e) {

//get the values from the DetailsView

TextBox StartTime = (TextBox)EditEventForm.Rows[1].Cells[1].Controls[0];

TextBox EndTime = (TextBox)EditEventForm.Rows[2].Cells[1].Controls[0];

TextBox Location = (TextBox)EditEventForm.Rows[3].Cells[1].Controls[0];

TextBox Address = (TextBox)EditEventForm.Rows[4].Cells[1].Controls[0];

TextBox Admission = (TextBox)EditEventForm.Rows[5].Cells[1].Controls[0];

TextBox Description = (TextBox)EditEventForm.Rows[6].Cells[1].Controls[0];

TextBox Name = (TextBox)EditEventForm.Rows[7].Cells[1].Controls[0];


//show them in the confirm step

ConfirmEndTimeLabel.Text =
Convert.ToDateTime(EndTime.Text).ToString("h:mmtt");

ConfirmStartTimeLabel.Text =
Convert.ToDateTime(StartTime.Text).ToString("dddd, MMMM d yyyy h:mmtt");

ConfirmAdmissionLabel.Text = Admission.Text;

ConfirmDiscriptionLabel.Text = Description.Text;

ConfirmLocationAddressLabel.Text = Address.Text;

ConfirmLocationNameLabel.Text = Location.Text;

ConfirmNameLabel.Text = Name.Text;

}

For some reason the labels arent showing the textbox values. UIt worked on
all my other pages. Any idea why?
 
J

Jignesh

Could be problem somewhere else. check page_load event to ensure you have
if( !Page.Ispostback) condition written.

Regards
JIGNESH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top