Software Development
Blogs and Discussion
developer.*
Books Articles Blogs Subscribe d.* Gear About Home

WebForm_ DoPostBackWithOptions not defined

So for the third time in about 6 months I ran into the following message when working on an ASP.NET 2.0 website.

"WebForm_DoPostBackWithOptions not defined"

Specifically, I have an ImageButton control that when clicked is supposed to auto-postback and call a server-side function, in this case a "Logout".

I'm in the process of branching code from one deployment revision into a "Work In Progress (WIP)" directory for the next phase. In doing so, I had to set up an IIS virtual directory and copy all the necessary code there. With that done, I noticed that when clicking on the button, the desired logout mechanism was broken in the WIP. Thanks to the Firefox Javascript Console, I saw the message above and was able to track the problem down.

Even more maddening, for the site I'm working on we use the ComponentArt Suite and all of the functionality related to the Grid control stopped working. All the grids would load their items just fine, but would only display a small box where the grid should have been. As I said, this is the third time this has happened to me, and each time I forget what I did to fix the problem. So this is kind of like a bookmark for me. Hopefully it'll be useful to someone else.

I'm using IIS on Windows XP Professional SP2. Bring up IIS and right-click on your virtual directory. Select "Properties". On the Virtual Directory tab in the Application Settings section, click the "Configuration" button. This brings up the "Mappings" tab. Highlight the entry for ".axd" and click "Edit". Be sure that the lower left-hand checkbox for "Check that File Exists" is unchecked! If not, uncheck it and click "OK". The WebResource.axd references you see when doing "View Source" on a .NET webpage don't actually link to a physical file, so if this box is checked then the scripts don't get loaded correctly.

So there you have it.

Categories: 

Recent comments

User login

About our advertising.

Atom Feed

developer.* Blogs also has an Atom feed, located at this url.

Click here for more information about Atom.

A Jolt Award Finalist
Software Creativity 2.0
Foreword by Tom DeMarco

Recent Posters

Based on most recent 60 days, sorted by # of posts and name.

Google
Web developer.*

Who's online

There are currently 0 users and 24 guests online.

Syndicate

Syndicate content
All views expressed by authors, bloggers, and commentors are their own and do not necessarily reflect the views of developer.* or its proprietors.
Click to read the Copyright Notice.

All content copyright ©2000-2005 by the individual specified authors (and where not specified, copyright by Read Media, LLC). Reprint or redistribute only with written permission from the author and/or developer.*.

www.developerdotstar.com