disable href on content page from Master page in vb.net -


just title says. have code disables controls runat=server. follows

dim c control each c in pc    if c.hascontrols disableallcontrols(c.controls)     if c.gettype.tostring.tolower.indexof("webcontrols.dropdownlist") > -1       directcast(c, dropdownlist).enabled = false    elseif c.gettype.tostring.tolower.indexof("webcontrols.textbox") > -1       directcast(c, textbox).enabled = false    elseif c.gettype.tostring.tolower.indexof("webcontrols.radiobuttonlist") > -1       directcast(c, radiobuttonlist).enabled = false    elseif c.gettype.tostring.tolower.indexof("webcontrols.radiobutton") > -1       directcast(c, radiobutton).enabled = false    elseif c.gettype.tostring.tolower.indexof("webcontrols.button") > -1       directcast(c, button).enabled = false    end if  next 

but have couple of href's in there want disable also. know dont runat server, how can catch these?

you can add runat="server":

<a runat="server" href="..." ></a> 

it way maintain controls using server side code.


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -