I am attempting to use WebMonthView and associated controls for scheduling. When I double-click on a date to open the appointment dialog, I get the following error:
Microsoft JScript runtime error: Object expected
This occurs in AppointmentAdd.aspx on the line:
<body class="FormBackground" onload="AppointmentAddLoad()" style="overflow:hidden;PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px" bottomMargin="0" leftMargin="0" topMargin="0" rightMargin="0" XMLNS:igtab="http://schemas.infragistics.com/ASPNET/WebControls/UltraWebTab" XMLNS:igtbar
The onload function AppointmentAddLoad is highlighted. I am not able to debug into AppointmentAddLoad to determine what is happening.
I first encountered the error while attempting to use the controls in a new web application I am developing using NetAdvantage 2010.1. I upgraded to 2010.2 and then 2010.3 and still get the error.
Next I downloaded and ran the samples. To my surprise, they each ran perfectly.
I thought perhaps the problem had to do with the fact that initially I was not creating a data provider for the WebScheduleInfo object. I do not want the UI talking directly to the database, so I decided that a generic data provider talking to a dataset would be best. I created a test application to attempt this, and followed the directions in the online documentation article "WebSchedule Binding to a Data Set with WebScheduleGenericDataProvider". The code appears to match the article's directions, but I am getting exactly the same error.
Why do the samples work but my code does not?
I'd appreciate any thoughts anyone might have.
Just a piece of additional information. I believe the Samples, when they run, are using a standalone server similar to the development server in Visual Studio. The code I am having trouble with is running on my local machine's instance of IIS.
I have seen articles talking about ensuring that the AXD mappings are set to allow scripts to run. I believe they are, but I'm concerned that there is some other setting in IIS that I am missing.
Thank you for submitting your inquiry to the Infragistics ASP.Net Forums. The attached sample website was written in C# using VS2010 with NetAdvantage 2010 Volume 3 Build 1013.
Please test this sample and let me know of your results.
Sincerely,Mike D.Developer Support EngineerInfragisticswww.infragistics.com/support
As a follow up do you have any questions or need further assistance?
Sincerely,Mike D.Developer Support EngineerInfragisticswww.infragisitcs.com/support
Sorry I missed this response. I have just downloaded, compiled, and run the sample. Initially it ran using the dev server but not IIS. I ran into some other issues (locked configuration settings, for example) that I had to resolve but eventually got it working on IIS as well.
I notice that the solution has the forms as part of the project (rather than as part of a global igcommon directory). This is also true of the other samples that appear to work. I'm beginning to suspect that either a shared igcommon directory does not work or requires some IIS setup that I am missing.
I will next try converting my app to include the forms locally. I'll post later to let you know how it went.
OK. After I changed my code to use a copy of the Web Schedule forms within my website, I am able to launch the dialogs correctly. I would rather use a shared folder for these forms to prevent possible mistakes when updating Infragistics, but this is the only method that worked for me.
If anyone else needs to know how to do this, here are the steps I had to do:
1) Find the Infragistics WebSchedule Forms directory. For me the directory was here: C:\Program Files (x86)\Infragistics\NetAdvantage 2010.3\ASP.NET\CLR4.0\. The location will be different depending on the version of NetAdvantage and the CLR.
2) Copy the Forms directory to your website. I placed it just below the root drectory for the web site.
3) Move App_Code and App_GlobalResources to the root directory for your website. These are found in Forms\WebSchedule.
4) Edit Web.Config. Add the following immediately after the <configuration> tag:
<configSections> <section name="infragistics.web" type="System.Configuration.SingleTagSectionHandler,System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/></configSections><infragistics.web formsDirectory="~/Forms/WebSchedule"/>
5) Compile and publish. When you publish, make sure the new directories are copied to the server.