On Mar 28, 9:00 am, "Jeff" <it_consulta...@hotmail.com.NOSPAMwrote:
Hey
ASP.NET 2.0
In my webpage (.aspx) I have this tag:
<div id="test" class="pageTitle">Hello World</div>
I'm wondering how I in Page_Load event can change the "Hello World" text to
something else...?
First I need to get a reference to this div tag, so I'm trying this code,
I'm NOT sure it works:
System.Web.UI.HtmlControls tttt = (System.Web.UI.HtmlControls)
System.Web.UI.HtmlControls.HtmlGenericControl.cell .FindControl("test");
Any suggestions?
Since everybody else has given you perfect answers here I'll just fill
in the fact that you can get ANY controls (inclusive the body tag,
title tag etc) to become a "runat='server'" tag...
This also gives you nice capabilities to use the ~ operator like for
instance:
<a href="~/MyPage.aspx" runat="server">xxx</a>
This will map to e.g. localhost/MyApp/MyPage.aspx when run in the
debugger...
Nifty little trick :)
Thomas
--
http://ajaxwidgets.com
ASP.NET 2.0 Ajax Widgets