473,387 Members | 1,641 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Error 500 ONLY on first postback from certain controls

Visual Studio 2005

I have a moderately complicated form. It has four User Controls, which
are (somewhat simplified):

1. A tree control showing an employee hierarchy

Below a tab strip with three tabs:

1. A User Control containing a check box (AutoPostback = True), a
couple of labels and a grid (which is itself a user control, being a
handy wrapper for the standard Grid)

2. A User control containing a check box (AutoPostback = True), a
couple of labels, A COMBO BOX CALLED GOOD (AutoPostback = True), and a
grid.

2. A User control containing a check box (AutoPostback = True), a
couple of labels, A COMBO BOX CALLED BAD (AutoPostback = True), and a
grid.

So, I'm testing this baby and it looks spiffy. However, when I dropped
down the BAD combo box (thus causing the first PostBack) the
application barfed with "500: The server can't fulfill your request"
When I investigated further I found that ALL the other controls caused
the same error.

Except.

The GOOD combo box didn't barf - it did it postback as required.
What's really weird is that It then seemed to "enable" the rest of the
form so that all the other, previously barfing controls, now work
correctly. In other words, if I do this:

Load Form
Drop-down BAD combo

Result: 500: The server can't fulfill your request

However, if I do this:

Load Form
Drop-down GOOD combo
Drop-down BAD combo

Result: Happy user.

Anyone any thoughts?

Edward

Anyone got any ideas?

Nov 3 '06 #1
1 1021

te********@hotmail.com wrote:
Visual Studio 2005

I have a moderately complicated form. It has four User Controls, which
are (somewhat simplified):[...]
I've worked out that the problem occurred with the only control
(cboStatus) on the form that was NOT throwing an exception (the GOOD
combo). However, if I removed the code to populate cboStatus the form
worked correctly.

This was the code:
Private Sub PopulateForm(ByVal stats As Delegator.Delegated.Statistics)

' Populate dropdowns
If Me.cboStatus.Items.Count <= 0 Then
WebUtils.Controls.DropDown.Populate(Me.cboStatus,
DirectObjective.List.GetStatusList)
End If
Public Shared Function GetStatusList() As SortedList
Dim Status As New SortedList
Status.Add("<select>", "<select>")
Status.Add("Not Agreed", "Not Agreed")
Status.Add("Agreed", "Agreed")
Status.Add("Approved", "Approved")
Return Status
End Function

However, and this is where it gets really weird, if I change the code
to populate the SortedList to this, it works (NOTE: the Key value
changed from a string to an integer).

Public Shared Function GetStatusList() As SortedList
Dim Status As New SortedList
Status.Add(-1, "<select>")
Status.Add(0, "Not Agreed")
Status.Add(1, "Agreed")
Status.Add(2, "Approved")
Return Status
End Function

Well, I'm baffled, but I've spent long enough on this.

Hope someone gets something from it.

Edward

Nov 6 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: TD | last post by:
This is the code under a command button - Dim ctl As Control For Each ctl In Me.Controls If ctl.BackColor <> RGB(255, 255, 255) Then ctl.BackColor = RGB(255, 255, 255) End If Next ctl
1
by: AA | last post by:
Hi I have a form on client end where I have certain controls. Now whenever the app is run, the postback is done from the server. But for few controls I do not want them to go to the server for...
1
by: Angel | last post by:
I have added controls to the placeholder control. All the controls that were added have EnableViewState = true including the placeholder. One of the controls has a button that performs a postback. My...
1
by: Lamont Adams | last post by:
Hi all, I've created numerous custom controls of varying complexity, but I've been on this problem for a day and a half, and I can't figure this mystery out. I hope one of you kind folks can...
3
by: Martin | last post by:
Hi, I have an aspx page with two dropdownlist controls. I update the options in the second ddl based on selection made in the first. I do this with the ICallbackEventHandler interface, as per...
2
by: Wizzard | last post by:
I have a repeater with and imagebutton on a page useing VS2005 ASP.Net 2.0 <asp:Repeater ID="Repeater1" runat="server" > <ItemTemplate> <div> <asp:ImageButton ImageUrl="button.gif"...
1
by: teddysnips | last post by:
Visual Studio 2005 I have a moderately complicated form. It has four User Controls, which are (somewhat simplified): 1. A tree control showing an employee hierarchy Below a tab strip with...
5
by: Bjorn Sagbakken | last post by:
Hello I have just migrated from VS 2003 to VS 2005, and .NET framework 1.1 to 2.0 I am at the end of debugging and fixing stuff. Now there is one error I just cannot find a solution to: On...
2
by: Nathan Sokalski | last post by:
I have a DataList in which the ItemTemplate contains two Button controls that use EventBubbling. When I click either of them I receive the following error: Server Error in '/' Application....
29
by: =?Utf-8?B?SGVybWF3aWg=?= | last post by:
Hello, Please anybody help me. I have only a little experience with web development. I created simple project using ASP NET 2.0 (VS 2005) It works fine on local computer. When I tried to run...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.