473,386 Members | 1,764 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Adding meta:resourcekey to database programmatically looping througwebcontrols

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;
}
Mar 3 '08 #1
0 1303

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: luciano.marchese | last post by:
I just want to get at runtime meta:resourcekey value. This is my code: <asp:Button ID="Button1" runat="server" meta:resourcekey="Button1Resource1" Text="Button" /> The problem is that it's not...
9
by: Neo Geshel | last post by:
I have strip-mined, strip-searched, and completely exhausted the Internet (up to the 30th page on Google, with 100 results per page!!), all without finding an answer to my question AS TO WHY IT...
0
by: Kurtis | last post by:
G'Day, I'm in the process of developing a custom ResourceProvider for an ASP.Net web application written in C# 2.0, which uses SQL server as the data store. I'm half way there! After setting the...
3
by: kiplinghfx22 | last post by:
Hello, I have designed an access database, but it doesn't have any security or passwords. I would like to set it up so that I am the only one who can write queries, and create reports. There...
6
by: | last post by:
I have made some user controls with custom properties. I can set those properties on instances of my user controls, and I have programmed my user control to do useful visual things in response to...
2
by: =?Utf-8?B?QWRhcnNo?= | last post by:
Hi Everybody, I created a webservice called “ser1” in the local host(http://Localhost/”). When I try to add the web reference to this web service(http://localhost/ser1/service.asmx), I am...
1
by: romcab | last post by:
Hi guys, I know this question of mine is very simple but I'm a newbie in ADO.net so I hope you dont mind. I was able to create and add a database to my simple application using Data -> Add New...
0
by: Rene Goris | last post by:
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...
6
by: teddysnips | last post by:
I'm having trouble adding Access 2003 databases to Sourcesafe. I go to Tools, Sourcesafe, Add Database to Sourcesafe... at which point a message box appears saying "This database must be closed...
4
by: coderr | last post by:
Hi all, i have simple question, suppose that we have a ASP.NET web site with lots of local resource files, we can simple delete all of the resource files (resx). Question is, how can remove all of...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.