asp.net - Can't Access HTML Attribute in User Control Page Load -



asp.net - Can't Access HTML Attribute in User Control Page Load -

i have asp.net user command has div runat="server". when seek access div's class attribute initial page load null exception error.

object reference not set instance of object.

protected sub page_load(byval sender object, byval e system.eventargs) handles me.load container1.attributes.add("class", "test") end sub

if container1 in kid command perhaps property needed on kid command looks specific attr, it's neater doing findcontrol , less prone errors

html asp.net pageload

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -