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

how to do line continuation in perl debugger for entering raw multi-line text (EOT)? -

javascript - Create websocket without connecting -

sharepoint - Accessing files across a shared directory using a Windows service -