It was my understanding that version 2.6.2 is AJAX-aware. I am using 2.6.2 and, if I put a user control containing a GoView into an UpdatePanel in ASP.NET, it does seem to work (with some drawing issues that I should be able to resolve). But, if I try to CREATE the GoView dynamically, so that sometimes there is a GoView in the panel, and sometimes there isn’t, then I get errors (an html rendering error and a javascript “Object Expected” error).
Am I correct in my understanding that 2.6.2 supports AJAX functionality? If that is the case, then I assume my design or implementation is wrong, and that is why I am getting the error.
I downloaded the eval version of 3.0.3 but I thought I should clarify this before I go to the trouble of switching to that version. Because, if the problem is in my implementation, then upgrading my version won’t solve anything.
Thanks very much for whatever advice you can give.
2.6.2 had some changes to make GoDiagram “AJAX aware” and work with UpdatePanel. Is the javascript error from goweb.js?
3.0.3 did have some minor changes to goweb.js, but I don’t think they were AJAX related. Still, it never hurts to run the latest version.
Thank you for your response.
Explore
Do you have the GoView as NoPost = true?
With Visual Studio and IE, you should be able to set breakpoints inside our goweb.js to see if it’s the __doPostBack there.
Thank you for your response.
I did have NoPost=“true” but, changing it to “false” has no effect. I get the same error.
The error happens before my breakpoints in GoWeb.js are encountered. (I do not see a __doPostBack() function defined in GoWeb.js but, I put break points at the two calls to __doPostBack() that are listed – in the GoPost() function, and those breakpoints were not encountered)
From what I understand, the debugger in VS is a little unreliable when it highlights source in the web page. But, with that being said, the lines that are highlighted in VS when the “Object expected” error is thrown are these:
[One oddity that I noticed - When the debugger throws the error, and I "break" the processing, if I hold my cursor over the words "name" or "id" on ANY of the lines listed above, the tooltip that pops up reads "GoView1". I am not sure if that is just weird behavior in the debugger or, if it has meaning] I thought that, possibly, I would need to pass the ASP-created ClientID of my GoView up to the parent page, and somehow get that into the __doPostBack function. But, I think I have proven that that is not the issue. Here is how: For testing, I created a user control (test.ascx) that is a simple wrapper for a standard label control:
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="test.ascx.cs" Inherits="test" %>
In my other (ctrlElmnt) control, that dynamically creates the GoView wrapper control, I replaced the GoVew code with code that dynamically creates this new user control (test.ascx), with the standard label in it. So, I am creating this simple control instead of creating the GoVeiw control...and I am doing it in the same manner that I create the GoView (one user control creating another, which in turn creates the final control--GoView\Standard Label). So, when I click the button on the test page, the label is created with no errors. It would seem that, if ClientID were the issue, it would also be an issue for this simple label, since it is created in the same manner as GoView. So, I am completely stumped. There must be something fundamentally wrong with the way I am trying to use GoView. I am sure the solution, once I find it, will be embarassingly obvious and simple but in the mean time, I have been completely stymied for a week now. I may just need to re-think my design, and start over. I can always revert back to using full page postbacks. Thanks
GoView NoPost=“True” is the desired value. However, only in version 3 is that the default value, so you should be sure to set it to true whenever you create a GoView.
__doPostBack is defined by ASP.NET to perform a post back. You should see it in the rendered HTML file.
Are you saying that the error happens only in a call to __doPostBack? As you can see in the definition of goPost in GoWeb.js, __doPostBack is never called as long as NoPost=“True”. (That server GoView property is mirrored as the client element’s goNoPost property in JavaScript.) And you have confirmed this by your breakpoints at the two calls to __doPostBack that a GoView might make.
So __doPostBack is being called by some other code as part of the (partial) post back mechanism used by other controls, including your user controls. Can you debug this to find out what is making the call that causes the error?
Thanks for your continued response.
Is there any way for you to send us a minimal example of this, not using any of your application-specific code or data? It would be helpful if we could understand and reproduce the problem.
Yes.