Showing posts with label everybody. Show all posts
Showing posts with label everybody. Show all posts

Wednesday, March 28, 2012

Calling a WebMethod from JavaScript (In another directory) doesnt work

Hello everybody,

I have a Web Part and in that web part (ascx) and in a seperate directory (Javascript/Authentication/login.js) I have a javascript.

I have a web method from the other side that check and see if a user is available or not. I know 100% my webmethod is working because when I run it I can test the webmethod in browser from Visual Studio.

The problem is that when even I try to access that webmethod (webservice) the error : WebService is not defined pops up.

I want to know why this is happening ? Is it because I have my javascript in a seperate file other than my web service file (asmx) ?


I appreciate any help.

Thanks.

Please totally forgive me, I had a syntax error, I fixed it now, working fine.

I typed the name of my web service wrong.

Sorry Again.

Wednesday, March 21, 2012

CalendarExtender makes things slow!

Hello everybody,

I noticed this behavior almost immediately when we used theCalendar Extender for the first time. But I waited to see somebody discussing about it in the forum. It took quite a while...


I have removed all theCalendar Extenders because it slows all the other parts of the ASPX page, for example: when you click on a button to fetch data from the database and load it in a grid, without anyCalendar Extenders its lightening fast... but add aCalendar Extender or 2 and then you can notice it starting to get slow


I have now switched back to the old way, using a Calendar control with aPopupControlExtender to display a pop up calendar, and its fast.
I am using a Master page, themes and my controls are inside anUpdatePanel


I think the usercmarshall26 is also experiencing the same problem which he explains inthis post

(but the Calendar that is displayed using theCalendar Extenderlooks cool!)

Hope somebody can relate to this problem... any suggestions from the experts?

You've got a couple of options...

1) Set<configuration><system.web><compilationdebug="false">in your web.config

2) Set theScriptMode="Release"property on the ScriptManager component

<asp:ScriptManagerID="ScriptManager1"runat="server"ScriptMode="Release"></asp:ScriptManager>

Either way, you should end up with the release version of the javascript coming down to you which is A LOT faster!!


Make sure you've got the 10301 release as well - there were several Calendar perf fixes in that release.

Thank you very much for both of your responses... I tried the latest update and, yes its fast now!

Now it'll be easier to hookup pop-up calendar functionality using the Calendar Extender, without worrying about performance.

I set theScriptMode="Release"in the Script Manager too, asJames_2JS suggested, hope it also contributed to the improvement.

Yes


Can you explain what these changes do?