| |||||||
HtmlAnchor.HRef PropertySystem.Web.UI.HtmlControls Namespace HtmlAnchor Class Sets or retrieves the destination of the HtmlAnchor control. Syntax
Property Value
The property is read/write with no default value. RemarksThe HRef property on an HtmlAnchor control can refer to:
When specifying an anchor, everything contained between the ExampleThe below example illustrates using the simple yet powerful databinding feature of ASP.NET. Databinding with the HtmlAnchor enables authors to dynamically generate hyperlinks on a Web Forms page using values from given fields in a data source. And when databinding is used within templates in list controls such as the <asp:Repeater>, <asp:DataGrid>, and <asp:DataList>, only a single declaration is needed to generate each hyperlink item in the list. Note that the method used in this sample not only generates the link text, but also the querystring parameter of the url, which determines what argument is passed along to each link. <a href='<%# DataBinder.Eval ( Container.DataItem, "title_id",
"details_title.aspx?titleid={0}" ) %>'>
<%# ( ( DataRowView ) Container.DataItem ) [ "title" ] %></a>
See Also |
| ||||||
Check out related books at Amazon
© 2000-2008 Rey Nuñez All rights reserved.
If you have any question, comment or suggestion
about this site, please send us a note
You can help support aspxtreme