Sorry! The thing is, I have a table in MS SQL server 2000 having the following columns, UserID, MenuID, MenuName, MenuCaption.
Now what I want to do is, if I retrieve the user I want to process the menus that have to be enabled for him or her. By default all the menu items are disabled. So when I retrieve the user and his or her menus, I now put the menu name in the sql table in a variable. The following is the sample code:
string menuToShow; try {
this.dsUserInfo.UserMenusView.Clear(); this.dsUserInfo.UserMenusView.BeginLoadData(); this.cmdSEUM.Parameters["@UserID"].Value = this.userID; this.daGetUserMenu.Fill(this.dsUserInfo, "UserMenusView"); this.dsUserInfo.UserMenusView.EndLoadData(); if (this.dsUserInfo.UserMenusView.Rows.Count > 0) {
foreach(DataRow urow in this.dsUserInfo.UserMenusView.Rows) {
menuToShow = (string)urow["MenuName"];
***menuToShow.Enabled = true
}
but the code with the asterix (the *** is not part of the code, just to show the line) generates this error "string does not contain a definition for Enabled"