Solved

TreeView in site master refresh when page data changes

Posted on 2014-03-01
2
638 Views
Last Modified: 2014-03-01
I have a stock standards asp.net 4.5 web forms application.

I am using master pages. in site.master I have a TreeView that I am using for navigation. It changes when data events happen in the pages.  in site.master.cs I have a

 private void BindNavTree() {}  method.  I want to call this method whenever data changes in any of the pages.

Any Help is appreciated

Thanks
0
Comment
Question by:charlesbaldo
2 Comments
 
LVL 16

Accepted Solution

by:
Easwaran Paramasivam earned 500 total points
ID: 39897747
It should be called if it is defined in master page correctly.

Otherwise there is another option..

You create a class file which derive  from Page class.

Example:


public class MyPage : Page
{

 //define the events and method here

//Have the method here...
private void BindNavTree() {}


}


then keep the class as your base page.


your aspx.cs

protected class test : MyPage
{


}


For your reference: http://www.asp.net/web-forms/videos/aspnet-dynamic-data/how-do-i-make-custom-pages

http://www.devexpertise.com/2009/03/25/aspnet-tiptrick-use-a-base-page-class-for-all-application-pages/
0
 

Author Closing Comment

by:charlesbaldo
ID: 39897797
Thank You
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question