TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Joma Rajab
NA
110
51.5k
How to write code behind for <a> tag
Aug 24 2016 12:16 PM
I need to use a tag with click event and the href link I need to write it in code behind
when the link is clicked it will be opened on iframe by writing iframe id in the target of a tag
I tried the code below
please help
Thank you
<a id=
"urlbb"
runat=
"server"
>web1
<asp:PlaceHolder ID=
"url"
runat=
"server"
Visible=
"false"
>
<iframe name=
"aa"
width=
"100%"
height=
"800px"
style=
"margin-top:50px"
></iframe></asp:PlaceHolder>
<asp:PlaceHolder ID=
"mainbody"
runat=
"server"
Visible=
"true"
>
.
.
.
.
</asp:PlaceHolder>
Code behind
protected
void
urlbb_ServerClick(
object
sender, EventArgs e)
{
mainbody.Visible =
false
;
url.Visible =
true
;
urlbb.Target =
"aa"
;
urlbb.HRef =
"http://www.bradford.ac.uk/it-services/students/email/"
;
}
Reply
Answers (
7
)
how to insert and update multiple dynamic checkbox in mvc
web from using ajax