Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
5
Reply
use javascript calling code behind function.
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
Ekrem Tapan
8 years ago
242
1
Reply
hi.
i want to use javascript code then call to code behind method. im trying some thing but something is wrong not working . anybody can help me ?
<script type=
"text/javascript"
>
function
checkMe() {
alert(
"hello"
);
PageMethods.Counting;
}
function
onComplete(result, response, content) {
alert(result);
}
</script>
when i click to <a href=""> tag how to call the below function ?
string
.Format(@
"<a href='{0}' onclick='checkMe();' runat='server'>{1}</a>"
, newlink.NavigateUrl, dt.Rows[contID][
"FAQTITLE"
].ToString()) ;
and then my code behind method what i want to call
protected
void
Counting(
object
sender, EventArgs e)
{
//my code is here
}
Post
Reset
Cancel
Answers (
5
)
Next Recommended Forum
how to install zebra scanner in system , step by step proc
Terminating web page after 15 minute