Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding attribute to <body> tag 1

Status
Not open for further replies.

James1981

Programmer
Nov 2, 2002
76
0
0
US
Hi I want to add an attribute at runtime to the body tag

e.g. <body myAttribute=1>

How do I go about doing this?

Thanks

James
 
Create a databinding in the HTML

<body myAttribute=<%# MyFunction%>>

and in your code behind

Protected Function MyFunction() as integer
Return 1
End Function

and in the code behind for your page load

Me.DataBind

Hope this solves it for you

Mark [openup]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top