How do I create a function common to all the pages in ASP.net? -


i'm making website has menu on pages needs changed frequently. right i'm copying code of menu in pages, , so, if menu needs changed, have open each page , change menu there.

is there way define function in file somewhere writes menu code using response.write() , keep calling function on pages need menu? way whenever i'd need make changes menu, i'll make in function definition.

master page perfect candidate.

add menu in master page.

you can create user control this.

but if want function doing common task through out site create class

and add function class. create object of class , call function

anywhere in site.


Comments

Popular posts from this blog

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

php - Get uncommon values from two or more arrays -

Adding duplicate array rows in Php -