asp.net - Find and Call Sub from Master.vb in ASP VB.NET -


i need find , call sub below in master.vb separate file (about.vb). reason need i'm showing count of values in cookie on every page need change cookie values , count in about.aspx.vb file. fall 1 number behind when master sub checks cookie it's changed after master loads.

below sub need call about.aspx.vb:

sub favsidetab()     if request.cookies("favourites") isnot nothing          dim favcookieval string = request.cookies("favourites").value          favouritessidetab.visible = true         dim cnt integer = favcookieval.count(function(ch) ch = ","c)         favouritescount.text = cnt     else         favouritessidetab.visible = false     end if end sub 

in masterpage use code

public sub favsidetab()   if request.cookies("favourites") isnot nothing     dim favcookieval string = request.cookies("favourites").value     favouritessidetab.visible = true     dim cnt integer = favcookieval.count(function(ch) ch = ","c)     favouritescount.text = cnt   else     favouritessidetab.visible = false   end if end sub 

in content pages (code blocks) use code...

me.master.favsidetab 

Comments

Popular posts from this blog

java - Andrioid studio start fail: Fatal error initializing 'null' -

android - Gradle sync Error:Configuration with name 'default' not found -

StringGrid issue in Delphi XE8 firemonkey mobile app -