.NET Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgramming.NET Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old September 29th, 2003, 05:05 AM
waxberry waxberry is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 1 waxberry User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Dynamic Custom-Server Controls with XML

I've been working on a dynamically generated data input page, and have the process operating OK.

I have a stored proc' that returns Xml, and this is inturn combined with an xslt so as to apply .net server controls, and it is then parsed and added to a placeholder object. My only problem at the moment is how can I apply my own custom controls in the xslt, I have tried applying another namesspace, ie, xmlns=MyControl:...., but it fails at the parsing section, complaing

'Unknown server tag'

Is there some way of telling the parser to look at the registered namespaces on the main page?

Reply With Quote
  #2  
Old February 13th, 2004, 11:38 AM
mr_smalde mr_smalde is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 1 mr_smalde User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Dynamic Custom-Server Controls with XML

hi mate, did you find any workaround to be able to create custom controls at runtime using xml and xslt? I am trying to do the same thing and getting the same 'Unknown server tag' error ! Please let me know if you've found any solution.
Thanks. Cheers.

Reply With Quote
  #3  
Old May 7th, 2004, 01:53 AM
bitethebytes bitethebytes is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 4 bitethebytes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hi there!

I have the same problem too. But i also have no solution for this problem.
Do you have figured something out meanwhile ?
Thanks

Reply With Quote
  #4  
Old May 7th, 2004, 03:48 AM
bitethebytes bitethebytes is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 4 bitethebytes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I have tried something like this:
(I work with an XML-File, but should be the same...)

XPathDocument xpdocControlsDoc = new XPathDocument( Server.MapPath( "YourXML.xml" ) );

XslTransform xsltTransform = new XslTransform();

xsltTransform.Load( Server.MapPath( "YourXSTL.xslt" ) );

StringWriter sw = new StringWriter();
xsltTransform.Transform( xpdocControlsDoc,
null, sw, null);
string result = "<%@ Register TagPrefix=\"YourPrefix\" Namespace=\"YourNamespace\" Assembly=\"YourAssembly\" %>";
result += sw.ToString();

Now (with the register in front of the string) i could parse the string without error message.

Control ctrl = ParseControl( result );

and then add the Control to the placeholder

aspphContainer.Controls.Add( ctrl );


I hope that this is what you wanted to know ?
I'll have to try with it for myself a little bit. I am also in the need to dynamicly generate forms out of XML.
Normaly no problem if i just work with standard asp-tags but with my own custom server controls...

Cya




Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgramming.NET Development > Dynamic Custom-Server Controls with XML


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT