Contents tagged with ASP.net AJAX
OK, so for some reason you have a mega mashup solution with ASP.net AJAX, jQuery and web forms.
Perhaps you are just on the migration from AjaxControlToolkit to the jQuery UI framework – who knows!!
Anyway, the problem is that when you post back with something like an UpdatePanel, you will find that your nicely setup jQuery stuff, like the datepicker for example will no longer work.
You may have something like this…
When you’re ASP.net UpdatePanel post back, you will find that your datepicker has gone. Bugger!
Well you need to add this little gem to set it back up again once the UpdatePanel comes back to the page.
Your choice…you have the power
Share this post :
Sahil Malik recorded a series of SharePoint episodes, 4 in fact. He starts with what happens when SharePoint is installed and finishes with some massive XML files for a Business Data Catalogue application. Tip: They are an hour long, so watch it in fast mode, the talking speed is still good and it only takes 30 mins to watch.
Edit Master Pages
Using SharePoint designer you can edit the master page of your site - although I didn't do any editing, I did open the master page in designer, just to have a look at it!
SharePoint is obviously made up of webparts; being able to write your own and add them to SharePoint, I think, is a huge advantage. There are a couple of steps to get them into SharePoint that without some help, you'll never figure out!
asp.net AJAX in SharePoint
http://sharepoint.microsoft.com/blogs/mike/Lists/Posts/Post.aspx?ID=3 (if you are using the AJAX framework in .net 3.5 you will need to amend the XML accordingly)
Although I have been able to get the XML done, added a scriptmanager to the master page, I am having problems getting the update panel to wrap the contents. I haven't spent a great deal of time looking at it – perhaps someone is aware of a Gotcha??
Host WCF service in SharePoint
Use WCF service from outside Sharepoint
Calling a WCF service from within a custom web part is really, really easy. Basically follow exactly the same steps you would in any other project, just remember to put add the ServiceModel section to the web.config on your SharePoint site. I didn't try this originally as my web part and WCF service are .NET 3.5 and Sharepoint site is .NET 2.0, I thought it wouldn't work, however as .NET 3.5 is an extension to .NET 2.0 it does! :) Happy days! I did consider writing the endpoint code in C#, but when you use a reference to a hosted service, the endpoint is read only.
Join up at http://silverlight.live.com - if you haven't seen it, you can upload your Silverlight apps and movies to MS servers – it's a pretty cool service and if Silverlight is your bag, you NEED to use it!!
I created a couple, a blog site and some others, it's pretty self explanatory really, especially if you watch the dnrTv videos.
- I want to figure out how to call WCF services from BDC applications - direct to SQL is not for me!
- More AJAX in Sharepoint, perhaps the toolkit.
- Sharepoint API, what can I do?
- I didn't touch on Security at all; everything is using the "admin" user. Yuk!
- Site content types, Sahil covered these in the second webcast, but I am still not 100% sure how I could make use of these, or if I would even want too!
- The other 4 million things that Sharepoint has! It's really big you know! J - Take some guidance on direction from "The Book" when it arrives!!
Anyone looking for top notch windows 2008 hosting should take a look here
Day one is over at MIX UK. As my first experience of a Microsoft conference I must say I was not disappointed :) The conference opened with a keynote from George Moore and Scott Guthrie and lots of small demos from third party companies and the little apps they have developed using MS technologies, mainly Silverlight, which is the main theme of the conference, well day one at least!!
In the first and second session I stayed with ScottGu and watched as he ripped through the power of silverlight, present and future. As well as the basic XAML shapes and textblock, he covered some features of the *special* silverlight CLR. He also stated that there will be a set of controls (50 was the quoted number!), from basic input controls like the Textbox to more advanced controls like the DataGrid - this for me as a business application developer is fantastic, I have enjoyed playing with Silverlight but didn't really have a "real life" use for it without the ability to databind to controls. These will be distributed in a similar format to the AJAX Control Toolkit, with full source downloadable which is pretty cool.
I have a silly little jotter pad I have written as my first silverlight application - I must post it up at some point. I know, I am gonna get the FREE 4gb of silverlight hosting MS offer and then I'll post the link! You should check out the silverlight hosting - if you plan of hosting video in silverlight to stream then this will save you a fortune in bandwidth etc. There are limits like only a 10min video can be uploaded (this is due to and MPEG licensing thing apparently - video is not my thing!) You can only upload 30MB at a time. There is also a limit on the number of minutes streaming you can have but its very high!
Next, I opted to go for the "Developing Next Gen Web Apps with Windows Live Services", this I regret, not because it wasn't good, Angus Logan and Danny Thorpe did a good job (Angus was pretty humorous) but I just knew most of what they demo'ed (Virtual Earth stuff), I guess I took the safe option as a pose to going to "A nice cup of tea and a sit down" which may or may not have involved interaction from myself - heaven forbid!
Also didn't help being sat next to someone with an entire colony of blood sucking ants having a carnival in his pants, the chairs are linked together, it got a little hairy at times!!
We'll see what tomorrow brings! We have been advised to hang around till the end when swag bags will be distributed...but the contents are yet to be revealed!
So the other day I was adding a “news page” to one of my projects and thought it was a great chance to play with consuming some other RSS feeds that had related information to what I was working on. So I started looking round and found the RSS Toolkit that had an RSS Data Source control that is perfect for consuming RSS feeds – the toolkit actually does much more, you should have a read on Dmitry’s blog (he wrote the toolkit and in on the ASP.net team) download the toolkit here.
I have also used the ASP.net AJAX Toolkit (which if you are unaware is a collection of controls for use with ASP.net AJAX, its an open source project with contributors from both MS and the community) the control I use is the Collapsible Panel control so you can see a list of the Blogs and click each to reveal the text.
To use this you will need to have ASP.NET AJAX RC1 installed.
Simple page layout using CSS, the right panel contains a Datalist control bound to the RssDataSource to display the blog items, the datalist control is wrapped in an asp:UpdatePanel. The item template in the datalist has a collapsiblepanelextender from the AjaxControlToolkit to display the description of the blog item.
Chaging the selection of Blog to view fies the asp:UpdateProgress panel to display, the blog items are loaded and displayed. You can see on the Blog list I have simply shaded the background of the <li> element to show the active blog.
The code for this is pretty simple with all thanks going to the AjaxControlToolkit team and Dmitry for the RSS reader.
List of blogs on the left....
C# Code Behind
As you can see each Link button is hooked up to an OnCommand Event Handler and the argument identifies which blog feed to bind to the data source.
If ele (the <li> element) is null I assume this is the first call and so the element will be list1.
Hope you find this as useful as I did - download the full source here.
So they have released ASP.net AJAX RC1 which is apparently the penultimate release before the fully supported product.
Couple of new features...
- Built in VS 2005 Web Application Project template to create new AJAX application.
- Additional globalisation support for AJAX applications, improved substitution logic, compression and caching.
- The assembly Microsoft.Wev.Extensions.dll has changed to System.Web.Extension.dll and the namespace Microsoft.Web has changed to System.Web
Two reasons for the change which will be the last...
- ASP.NET AJAX will be fully-supported part of the core .NET framework in the future so for consistency
- It will help make upgrading to the Orcas release of ASP.NET and VS much easier.
Tip from ScottGu on intellisense. "One additional step you'll want to make after you follow the steps in the whitepaper above is to delete the cached schema files for control markup Intellisense that VS maintains. This will ensure that your HTML source editor Intellisense for the ASP.NET AJAX controls is correct and doesn't get lost (otherwise it might incorrectly use the old values from the Beta2 release).
- With Windows XP you do this by deleting all files in this directory: c:\Document and Settings\[YourUserName]\Local Settings\AppData\Microsoft\VisualStudio\8.0\ReflectedSchemas
- With Windows Vista you do this by deleting all files in this directory: c:\Users\[YourUserName]\AppData\Roaming\Microsoft\VisualStudio\8.0\ReflectedSchemas