0
<asp:button runat="server" Text="Save as" OnClick="btnSave_click"
OnClientClick="if(!Check('<% # tb.ClientID %>')) return false; return Object();"
CausesValidation="false"></asp:button>
<asp:TextBox runat="server" ID="tb"></asp:TextBox>
服务器标签在此处不起作用。我花了1-2个小时找到一些方法来完成这项工作,但我没有找到任何东西。ServerTags在OnClientClick中不起作用
服务器标签工作在:
<OnClientClick="JSFunc();"
<script type="text/javascript">
function JSFunc()
{
var el = document.getElementById('<% # tb.ClientID %>');
//some actions with el here
}
</script>
或其他的东西在C#。
有没有办法让服务器标签内联工作? (第一个例子)
ps。对不起,我英文不好