lem2802's right. Server-side code (including code-behind) will not recognize your anchor tag as a server-side object unless you give it the runat="server" attribute. Otherwise, the server just sees it as free text in the page and sends it to the browser as is (where the browser will recognize it as an anchor element and let client-side code access it accordingly).
Do note that if this anchor element exists inside of a control (ascx or custom), or your page is using master pages, then this might change the client-side ID of the element, which can disrupt any client-side references (JavaScript or CSS) you might have to this element unless you adjust accordingly. (Of course, if you have no such client-side references, this difference likely won't matter to you.)
Main Topics
Browse All Topics





by: lem2802Posted on 2007-06-29 at 09:08:54ID: 19391122
try adding the runat="server"
Summary</a >
mary"
<a href="#" runat="server" style=" margin-left:3%; color:Blue" id="SummaryLink" onclick="displayDetail()">
then in codebehind...
SummaryLink.innerText="Sum