Hello,
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
="http://schemas.infragistics.com/ASPNET/WebControls/UltraWebToolbar">
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.
Doug
Hello Doug,
Thanks for the information.
You can also find the WebSchedule folder in the Inetpub located under wwwroot at: C:\Inetpub\wwwroot\aspnet_client\Infragistics\200XXCLRXX\Forms\WebSchedule.
For including WebSchedule Dialog Forms to your website can be found here in our help documentation: http://help.infragistics.com/NetAdvantage/ASPNET/2010.3/CLR4.0/?page=Web_WebSchedule_Including_WebSchedule_Dialog_Forms_in_your_CS_Web_Site.html
Let me know if you have any questions with this matter. Thank you.
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.
6) Test.
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.
As a follow up do you have any questions or need further assistance?
Sincerely,Mike D.Developer Support EngineerInfragisticswww.infragisitcs.com/support
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