Jump to content
kwilliams

HELP: XML/XSLT/ASP.NET Calendar Control

Recommended Posts

Can someone give me the basics or point me in the right direction on how I can create an ASP.NET calendar control within a XML/XSLT transformation? I'd really appreciate any help. Thanks.

Share this post


Link to post
Share on other sites

What exactly are you reffering to? A "Goole Calendar" like application? You know, where you can arrange events in a calendar?Could you by any chance use SAXON, and to be more precise - its .NET verison?I once saw this sort of an application (I'd say it was a little too verbose for me, but it worked non the less), but I don't have it now. Still, you can do it in XSLT in a similar fashion you'd do it with plain ASP.NET.Tell me how you'd do it with ASP.NET (with the events coming from an array or something) and I'd probably tell you how to translate that into XML/XSLT.

Share this post


Link to post
Share on other sites
What exactly are you reffering to? A "Goole Calendar" like application? You know, where you can arrange events in a calendar?Could you by any chance use SAXON, and to be more precise - its .NET verison?I once saw this sort of an application (I'd say it was a little too verbose for me, but it worked non the less), but I don't have it now. Still, you can do it in XSLT in a similar fashion you'd do it with plain ASP.NET.Tell me how you'd do it with ASP.NET (with the events coming from an array or something) and I'd probably tell you how to translate that into XML/XSLT.
Sure. I basically want to use the ASP.NET Calendar Control (see http://www.w3schools.com/aspnet/control_calendar.asp) within a XML/XSLT transformation. After I've created a basic ASP.NET calendar within the XSLT doc, I then want to try to populate the calendar with events that are located within a XML document.I've been reading about ways to use ASP.NET controls within an XSLT document, but haven't had any success in implementing it. Do you know of a way to do this? Hope this info is more thorough, but let me know if you need any other info. Thanks.

Share this post


Link to post
Share on other sites

Most of the .NET WebControls have the property of being able to be DataBound. That is to say, you can bind a data source to that web control and the web control itself will parse through the data to display what you want it to.I know you can bind XML data to Repeaters, DataGrids, Lists, DropDownLists, RadioButtonGroups, etc. You should be able to bind XML data to the Calendar control as well. You might want to look into the XmlDataSource class. Alternatively, what I've done in the past is to create a DataTable and load the XML data into the DataTable and use that as my data source for the web control.

Share this post


Link to post
Share on other sites
Most of the .NET WebControls have the property of being able to be DataBound. That is to say, you can bind a data source to that web control and the web control itself will parse through the data to display what you want it to.I know you can bind XML data to Repeaters, DataGrids, Lists, DropDownLists, RadioButtonGroups, etc. You should be able to bind XML data to the Calendar control as well. You might want to look into the XmlDataSource class. Alternatively, what I've done in the past is to create a DataTable and load the XML data into the DataTable and use that as my data source for the web control.
Hi jesh,Thanks for the suggestions. I looked over the first article you titled "XmlDataSource" at http://msdn.microsoft.com/en-us/library/sy...datasource.aspx, and noticed this sentence: "No XSLT transformation can be specified in the Transform or TransformFile properties." So this solution wouldn't work with my setup, as my entire site uses XML/XSLT transformations from a central ASP.NET Master Page.Concerning the second suggestion, I think that it also focuses on using the ASP.NET code-behind doc to do the work, while I'd prefer a way for the XSL doc to utilize the ASP.NET calendar control on its own. I've read several articles that say this is possible, but when I've tried their sample code, it never works. Do you have any suggestions on how I can accomplish this? I'd appreciate and and all help. Thanks.

Share this post


Link to post
Share on other sites

I, unfortunately, don't have any answers for you. I've never used the .NET Calendar control. The only XSL Transformations I've done in .NET was to convert an RSS-style feed into HTML documents so that they can be zipped up and emailed off and I don't think any of that would benefit you here.I have built calendars before whose data came from XML documents, but they used DOM manipulation of the XML to get the data and I render out the HTML by myself using StringBuilders and assigning the final results to Literals. I can't even really wrap my mind around how it would be possible to use XSL to supply data to a calendar.

Share this post


Link to post
Share on other sites

Maybe I didn't got your idea correctly the first time. You want to actually execute an ASP calendar control from within XSLT?!?! I'm now actually more confused than I was at the start.You can always execute the control and generate an XML document from it. You can then apply XSLT on the produced XML document, or apply the document as a parameter to the transformation. I'm not sure if this will be appropriate for your situation though.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...