Click here to Skip to main content
15,884,537 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi every body ,

I have a Link Button when i click on that linkbutton it's navigating with another page the url of that is "https://km.lntecc.com/edrc/ems/Documents/EMS_PTD.xls[^]". I want to use Anchor tag while clicking on this link button. I want a synatx for code behind .


Thanks & Regards
Naveen
Posted
Comments
Irbaz Haider Hashmi 12-Feb-13 4:11am    
you want anchor tag instead of link button?
Naveen.Sanagasetti 12-Feb-13 4:14am    
yes, inside of linkbutton_click event
Irbaz Haider Hashmi 12-Feb-13 4:23am    
you want to reference anchor tag in the click event of linkbutton on server side?
Naveen.Sanagasetti 12-Feb-13 4:30am    
yes
Irbaz Haider Hashmi 12-Feb-13 4:33am    
just add id and runat to the anchor tag and you can refer that on server side

<a href="YourLink" id="ahref" runat="server">My link

1 solution

ASP.NET
<a href="YourLink" id="ahref" runat="server">My link</a>



adding id and runat="server" you can access any html element on your server side.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900