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
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.
Hello Doug,
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
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.
Do you have any further questions on adding the WebSchedule folder to the root of the project? The steps shows also which files to include in the project.
Let me know if you have any questions with this matter. Thank you.
As I stated in an earlier post, I have my application working with the calendar forms copied into the application. So, from that standpoint I'm all set.
The only open question as far as I'm concerned is why I can't make it work with a common set of forms shared by mutliple web sites/applications. It's not something I'm very concerned about at the moment since I'm operational, but it does bother me from an architecture standpoint. I shouldn't have to maintain multiple copies of a common library of code.
I suppose it is a bridge I'll cross when I have to. For now, I'm able to proceed with the development I need to do.
Do you have any further questions on setting the ASP.NET version and configuring it for the virtual directory specified? This should allow you use forms in a common directory and run them using the asp.net version 2.0.
This may help someone. I was reading this thread to see if I could figure out we the AppointmentAdd page always opened with null in the Start and End time fields
I saw the suggestion to change the formsDirectory setting in web.Config and when I looked at my web.Config I saw that the formsDirectory had been set to http://localhost/......
I changed localhost to the actual server name and everything worked fine!!
JohnG