.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

how to set html attributes to asp.net controls

Posted By: priya     Posted Date: June 14, 2009    Points:2   Category :ASP.Net
how to set html attributes to asp.net controls in asp.net application. For eg. i want to set "alt" attribute to asp.net image control.

I am using asp.net and C# as code language


Author: Akhil Raj       [Moderator]      
Posted Date: June 15, 2009     Points: 5   

hi priya...
Asp.net control have attributes like html attributes but some attributes name changed..

For asp.net Image control 'alt' attributes can set using 'AlternateText' just check the following example

<asp:Image ID="img1" runat="server" ImageUrl="image.gif" AlternateText="Image" />

Post Reply

You must Sign In To post reply
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend