C#Button在体内调用Facebook Javascript [英] C# Button calls Facebook Javascript in the body

查看:78
本文介绍了C#Button在体内调用Facebook Javascript的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我的facebook javascript将起作用,如果我使用html超链接onclick =postSomething()



但是如何在我的LinkBut​​ton中调用这个postsomething()函数?



< asp:LinkBut​​ton ID =LinkBut​​ton1runat =server OnClientClick =postSomething()> LinkBut​​ton





点击此链接按钮后,我正在尝试会话文本输出。< br $>


感谢您的帮助!



您的,

Aaron

Hi,

My facebook javascript will work if i uses html hyperlink onclick="postSomething()

But how can i call this "postsomething()" function in my LinkButton?

<asp:LinkButton ID="LinkButton1" runat="server" OnClientClick="postSomething()">LinkButton


I'm trying to session the Text output once i click this linkbutton.

Thanks for your help!

Yours,
Aaron

推荐答案

你必须如下调用:



You have to call like below :

<asp:LinkButton ID="LinkButton1" runat="server" OnClientClick="return postSomething();">LinkButton</asp:LinkButton>







如需了解更多信息,请查看:



http://stackoverflow.com/questions/1672235/call-javascript-fr om-link-button [ ^ ]



我希望这会对你有所帮助。




For more info check this :

http://stackoverflow.com/questions/1672235/call-javascript-from-link-button[^]

I hope this will help to you.


这篇关于C#Button在体内调用Facebook Javascript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆