AspdotnetCodes.com
Search
Articles
Books
Resources
Asp.Net News
Downloads
Free Tech Magazines
Asp.Net Web Hosting
Archives
Softwares
Newsletter
Suggest Us
Link to Us
Feeds Subscription
Articles
Questions & Answers
Tips & Tricks
 Which attribute of hyperlink can replace *rel* attribute in href??
Posted by Ankur Dagar on  11/13/2009 7:35:38 AM Category: Asp.Net 2.0
Add to my favorites
Email to friend
My code is ::


<asp:HyperLink ID="HyperLink1" NavigateUrl="~/images/image-1.jpg" ImageUrl="~/images/thumb-1.jpg" rel="tag" runat="server">HyperLink</asp:HyperLink>



but it creates an warning::

" Validation (ASP.Net): Attribute 'rel' is not a valid attribute of element 'HyperLink' "

So which attribute can i use doing same function (as rel have) in this.

also can i use rel attribute or some other attribute if i am using image button or image??

any one have an ans plzz send ..


thanks




Post Your Reply Post New Question

 Viewer's Reply
Add "rel" attributes to Hyperlink from Asp.Net code-behind
Answered By Moderator1 on 11/15/2009 8:20:27 AM
Hi,

Not all property of a html control is available in the property list of the server controls. Anyhow you can add it from the code-behind as follows,

HyperLink1.Attributes.Add("rel", "tag");

Try this and if you have any related problem with this, please post under the same questions. Thanks.
 
Post Your Reply If you still have problem, post it again under this reply for better response.

 
Sponsored by
Backup and Recovery Best Practices for Microsoft SQL Server 2005
Introduction to Web Applications Development
SearchSAP