473,785 Members | 2,772 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 1505

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
1034
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"...
0
9643
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
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
9947
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...
0
8971
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7496
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
5380
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4046
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3645
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2877
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.