Intermittent Postback Bug

A

Al

I've got an intermittent bug with Postbacks and ASP.NET, maybe someone has
seen before:

In a nutshell, on two servers the form postbacks are fine, and all the
DropDownLists, TextBoxes, and else are accessible in the postback processing
routine.

However, when the same project is deployed to the production server the
postback processing routine receives NULL for the DropDowns, i.e.
"cmbType.SelectedItem" is null, even though all fields are filled in, and
the same code works on another server.........

Thanks!
Alex

CODE EXCERPTS:

PAGE LOAD:

private void Page_Load(object sender, System.EventArgs e)
{
if (IsPostBack)
{
ProcessForm();
Response.Redirect("default.aspx", true);
return;
}
}

protected bool ProcessForm()
{
String strIncidentXml;
//Type
strIncidentXml += "<casetypecode>" +
cmbType.SelectedItem.Value.ToString()
+ "</casetypecode>";
//Subject
strIncidentXml += "<subjectid>" +
cmbSubject.SelectedItem.Value.ToString()
+ "</subjectid>";
//Priority
strIncidentXml += "<prioritycode>" +
cmbPriority.SelectedItem.Value.ToString()
+ "</prioritycode>";
//Contact Name
strIncidentXml += "<CFSContactName>" +
lblContactName.Text
+ "</CFSContactName>";

....
}
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top