473,795 Members | 2,410 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1034

te********@hotm ail.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(By Val stats As Delegator.Deleg ated.Statistics )

' Populate dropdowns
If Me.cboStatus.It ems.Count <= 0 Then
WebUtils.Contro ls.DropDown.Pop ulate(Me.cboSta tus,
DirectObjective .List.GetStatus List)
End If
Public Shared Function GetStatusList() As SortedList
Dim Status As New SortedList
Status.Add("<se lect>", "<select>")
Status.Add("Not Agreed", "Not Agreed")
Status.Add("Agr eed", "Agreed")
Status.Add("App roved", "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
7239
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
1030
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 postback. I want the controls to remain only on the client end. Any suggestions are highly appreciated. I'm using ASP. Thnx.
1
5378
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 question is when the button is clicked and a postback is performed, the controls that were in the placeholder no longer appears on the screen! Am I doing something wrong here? Why are the controls back on the screen eventhough they have enable view...
1
1980
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 point out the really obvious and stupid thing I'm overlooking here. :) I have a custom control that provides a tasklist similar to what you get in certain parts of Office. On the client it consists of a bunch of nested, named and id'ed divs with...
3
7426
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 "Implementing Client Callbacks Without Postbacks in ASP.NET Web Pages" (http://msdn2.microsoft.com/en-us/library/ms178208.aspx) This works.
2
620
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" ID="ImageButton1" runat="server" /> <p><%# Eval("Name") %></p> </div> </ItemTemplate>
1
1506
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 three tabs: 1. A User Control containing a check box (AutoPostback = True), a
5
2006
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 some pages I have applied a small client-script to trap the enter-key beeing pressed and re-route this action. With the new version this little script still works, it traps the enter-key. BUT it causes postback-errors on many other .NET control,...
2
2177
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. -------------------------------------------------------------------------------- Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/in configuration or <%@ Page EnableEventValidation="true"...
29
2505
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 the application on the web, it give me an error about net framework version information.
0
9519
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10214
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10164
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10001
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7538
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6780
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3723
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2920
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.