Jump to content

HELP: XML/XSLT/ASP.NET Calendar Control


kwilliams

Recommended Posts

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.

Link to comment
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.
Link to comment
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.

Link to comment
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.
Link to comment
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.

Link to comment
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.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...