.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

How To: Refresh Menu or Toolbar content

Posted By:      Posted Date: August 27, 2010    Points: 0   Category :WPF
Hey all...in my WPF main window, I have a Menu defined with several elements and it is using a Markupextension to do the binding of the content.   <MenuItem Header="{extension:method Label}"/>   I want to be able to re-initialize the menu so it refreshes the labels. (I also need to do this on other elements as well) I saw some examples using WeakEvents to do this but it looks like the menu or window has to be bound to it. When I tried this, my EventManager kept on dropping the listener after two passes. Is there another way to do this other than coding it: mnuItem.Header = DomyFunction("Content")   TIA AndrewAndrew MacNeill (MVP VFP)

View Complete Post

More Related Resource Links

Repeating table not showing content following a rule refresh

Background info: I have a form where I populate employee info from the GetUserProfileByName ws. From there I populate its manager info from another web service call (seperate data connections).  Once the manager is populated, through rules, I'm populating the first approver. All this is done at form load through rules. The approvers node is defined as follows and is displayed on the form as a repeating table:  participants (group)    approver (repeating group)       ApproverName       ApproverLogin       ApproverEmail Problem: The repeating table is not showing any content even though I'm using an alert to show that I do in fact have one row in there. As a side note, I know the table is working because if the user elects to delegate approval to another user (through the people picker), the table shows these approvers correctly.  Anyone as any clue what I'm doing wrong? Thanks!    

Using browser / URL to load report, with rc:Toolbar=false, report does not refresh


I've got an app that hosts a browser control. In it, I loop through a set of reports (displaying a dashboard of them). The problem is, I don't want the toolbar to display, so I'm using rc:Toolbar=false. This gets the toolbar to not display, but the problem is, the reports don't refresh (I have timestamps in the reports, and they remain the same).

I'm not caching the reports- I have them set to the default setting of run the report each time.

So, how can I get both the toolbar hidden AND the report to be refreshed? I tried looking at the stylesheets, but can't figure out how to hide the entire report toolbar using those.



New menu not showing when content management enabled

As soon as I enabled content management on a custom list, the New menu dissapeared. Also on the home page under the list, "Add a new item" link also dissapeared. Is this by design.
How can I bring that feature back.

Adding New Custom Folder Content Type doesn't show up on the Document Library New Menu


I been trying to add new custom folder content type to the document library programatically in my sandbox environment and it does show up on the document library. But, when I move same code to the almost similar configured SP2010 environment, adding new folder content type to the document library doesn't show up on the document library's new menu.

Here is the code? Since this code works fine in my sandbox environment, is there any other settings I should check on the server environment which would cause hiding content type on new menu of document library.

  class Program
    static void Main(string[] args)
      SPSite spSite = new SPSite("http://sp2010vm");
      foreach (SPWeb spWeb in spSite.AllWebs)
        spWeb.AllowUnsafeUpdates = true;

        //For each site, cycle through lists
        bool isDocLibraryExists = false;
	      foreach(SPList spList in spWeb.Lists)
          if(spList.Title == "Classified Documents")
             isDocLibraryExists = true; 
        if(isDocLibraryExists == true)
          //Create new doc library
          SPList splist = spWeb.Lists["Classified Documents"];

          //Create Content Type
          SPContentType documentContentType = spWeb.AvailableContentTypes["Classified Documents Folder"

refresh update panel content with new css styles


Ok, I was working on this last week and took a break from it to 'regroup' and start over.


Here is what I'm trying to accomplish.

1. have  a web form with dropdowns to allow the user to select font sizes, colors, background image, etc.

2. I want to the form to be updated with the new styles in an update panel.

3. Once the user clicks the apply button, I want the updatepanel to refresh with the new styles.


I tried this by creating an css on the fly, but the updatepanel wasn't picking up the new css without doing a full page refresh, (which we don't want to do).

I only want the updatepanel refresh and either use inline styles, a <style> on the web form etc,

any suggestions or recommendations on how to accomplish something like this?


Custom action to actions- menu on "manage content and structure" sitemanager.aspx page


Hi all


I need to add custom action to actions menu of document library when user is in "content and structure" and can multiselect items from doclib. (doc lib is active in left side)


Any ideas how to add that?


By default the Action menu contains items copy,move,delete|checkout,discard checkout, checkin,publish,unpublish


Other option would be to add multiselect support to doc libraries.


Thanks for the ideas in advance,




Refresh WCF External Content Type Schema


I'm using BCS to map an external content type to some CRUD WCF Services. I've updated my WCF Service and there are new field types in the content types returned. Is it possible to refresh the External Content Type to pick up the new fields from the WSDL? Or do I have to recreate the content type each time there is a schematic change?


Barry Gervin

Barry Gervin

SharePoint Tutorial - Content Types

SharePoint content types provide users with a way to manage and organize content in a more meaningful way. It's a reusable of settings you want to apply to a particular type of document in a library or item in a list.

Enabling Users to Maintain SharePoint Content

When SharePoint is installed as a corporate intranet, there is a considerable amount of effort involved in maintaining the content to keep the site relevant. As we discussed in the first few parts of this series, SharePoint has many built-in features to reduce the burden on the site administrator.

Some areas of the site usually contain less-dynamic information. Internal memos and corporate policies are common examples of this information. One option for this information is to post these documents in a document library. Documents in a library are often stored in a few different formats: Word, Acrobat (PDF), or HTML. Each of these formats has its drawbacks.

ASP.NET Menu with jQuery Superfish

Choosing the right type of menu for a website is not easy at all. The ASP.NET Menu Control is definitely NOT a good starting point due to the horrendous markup it renders, nor is it good for SEO because of the Markup/Content ratio, neither can it be easily styled.

Application Vs. Content Pages in SharePoint

SharePoint has two types of ASPX pages. One type is the application page, also known as a _layout page. The other type of ASPX page is a content page, also known as a site page. Each of these page types is stored in a different location in SharePoint. When developers create custom ASPX pages, they must decide on the page type.

Enabling Users to Maintain SharePoint Content

When SharePoint is installed as a corporate intranet, there is a considerable amount of effort involved in maintaining the content to keep the site relevant. As we discussed in the first few parts of this series, SharePoint has many built-in features to reduce the burden on the site administrator.

Content Types in MOSS 2007

In this article I will try to describe the one of the best feature in Microsoft office Share Point 2007 called Content Types.

Content types are simply collection of contents.Each content in a Content type can have different settings.Basically it is a reusable collection of settings which you want to apply to a particular category of contents.

Content Query Web Part missing in SharePoint 2010

If you don't see content query web part listed in the web parts list, this is because you have not enabled "Search Server Web Parts" feature in site collection features. Enable this feature and content query web part will show in the list of web parts.

Unique content within master page based on conditions met


 Hi all-

I would like to present users with unique content based on certain conditions being met as they land on the home page (default.aspx).  The condition logic will be in the VB code behind Page Load event. The content will go in a content placeholder as specificed from the master page. 

However, the content change wouldn't be something small (ie making a panel or label visible or not) but rather it will be different HTML,  Divs and databound gridview content.  The HTML content will be stored in the database.

Can someone point me in the right direction for best practices on how to accomplish this?


Passing Linq Statement between master and content page


I usually work with windows forms, and am just starting to work with ASP.Net, so appologies if this is a dumb question!

I have a master page which has a search button on it. The results of this are built up using a Linq statement and if there are any results, I want to display the results in a contents page.

On the masterpage, I have the following code:

Private _res

    Public Overridable ReadOnly Property SearchRes()
            Return _res
        End Get
    End Property

 Private Sub DoSearch()
   'some code to get a linq result

    If res.Any Then
            _res = res
            Server.Transfer("SearchResults.aspx", True)
            'no results
            LabelNoRes.Visible = True
        End If
 End Sub

On the SearchResults.aspx page I have this code.

Dim m As pxSite = CType(Page.Master, MasterPage)
        If m.SearchRes IsNot Nothing Then
            Label1.Text = "Results found = " & m.SearchRes.Count
        End If

m.searchRes is always nothing. 

What am I doing wrong here?


Problem making Role based Menu in MVC application



 I want to make Rolebase menu in MVC such that if user doesnot have permission for some action then that Action name shouldnot be shown in the Menu.

 I have used the code in the url(http://forums.asp.net/t/1566328.aspx) in my MVC application.My application is a Discussion Forum(in MVC) same functionality as in this forum forums.asp.net

 I have used Controllers for post, thread etc.In each controller there are some actions that are using [Authorize(Roles)] attribute

 but this coding does not count  those Actions in Controllers having Authorize attribute according to the url http://forums.asp.net/t/1566328.aspx 

 In the code, Authorize attribute is applied to Controller class, but my requirement is of Applying Authorize attribute to some actions in controller so that some are available for all users and  some links are available rolewise.Now what is the solution for that?



ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend