PC Review


Reply
Thread Tools Rate Thread

Adding meta:resourcekey to database programmatically looping througwebcontrols

 
 
Rene Goris
Guest
Posts: n/a
 
      3rd Mar 2008
Hi all,

I am trying to add meta:resourcekey's to database programmatically
looping throug webcontrols, but i cann't read the 'meta:resourcekey'
from the webcontrol. The 'meta:resourcekey' will not show up as
attribute. How can i get the value of the 'meta:resourcekey' ?

THE CODE:

public string RetrieveControls(Control myControl){
string stringHtml = "<ul>";
foreach (Control c in myControl.Controls) {
stringHtml += "<li>";
if (c is WebControl){
// This does not work ...
// if (((WebControl)c).Attributes["meta:resourcekey"] != null){
// stringHtml += ((WebControl)c).Attributes["meta:resourcekey"];
// }
stringHtml += c.GetType().ToString() + " [" +
c.Controls.Count.ToString() + "] ";
} else {
stringHtml += "No webcontrol";
}
if (c.Controls.Count > 0)
{
stringHtml += "<ul>" + RetrieveControls(c) + "</ul>";
}
stringHtml += "</li>";
}
stringHtml += "</ul>";
return stringHtml;
}
 
Reply With Quote
 
 
 
Reply

Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding meta:resourcekey to database programmatically looping througwebcontrols Rene Goris Microsoft C# .NET 0 3rd Mar 2008 02:09 PM
Adding columns to a database table programmatically... =?Utf-8?B?Y2RiaWdncw==?= Microsoft C# .NET 6 8th Sep 2007 10:36 PM
Custom Resource Provider and meta:ResourceKey =?Utf-8?B?S3VydGlz?= Microsoft ASP .NET 0 14th Jun 2006 02:30 AM
How to get meta:resourcekey programatically? luciano.marchese@gmail.com Microsoft ASP .NET 1 1st Mar 2006 04:01 PM
Word META DATA (properties) programmatically adding =?Utf-8?B?Sm9obiBAIFg=?= Microsoft Word Document Management 1 13th Oct 2004 03:45 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:47 AM.