这是我的.aspx代码:
<asp:LinkButton ID="link" runat="server"> <telerik:RadToolTipManager
ID="toottip" runat="server" AutoTooltipify="true" Width="200px"
RelativeTo="Element" HideEvent="LeaveTargetAndToolTip"
WebServiceSettings-UseHttpGet="false" Animation="Fade"
EnableTheming="true" Title="Documents" ShowEvent="OnMouseOver">
<WebServiceSettings Method="GetToolTipData"
Path="InvestmentDropDownWebService.asmx" UseHttpGet="true"/>
<TargetControls>
<telerik:ToolTipTargetControl TargetControlID="link"></telerik:ToolTipTargetControl>
</TargetControls> </telerik:RadToolTipManager> </asp:LinkButton>
这就是背后的代码:
protected void Page_Load(object sender, EventArgs e)
{
DataTable dt = getName();
link.Text = dt.Rows[0][Name].ToString();
}
我正在尝试此代码,但问题是在鼠标悬停时,不会调用Web服务。如果我在.aspx页面中设置链接按钮文本,它工作正常......
如果文本来自代码隐藏,如何解决?
答案 0 :(得分:0)
您是否通过在aspx页面中提供空文本来尝试使用
<asp:LinkButton ID="link" runat="server" Text=" "> <telerik:RadToolTipManager
ID="toottip" runat="server" AutoTooltipify="true" Width="200px"
RelativeTo="Element" HideEvent="LeaveTargetAndToolTip"
WebServiceSettings-UseHttpGet="false" Animation="Fade"
EnableTheming="true" Title="Documents" ShowEvent="OnMouseOver">
<WebServiceSettings Method="GetToolTipData"
Path="InvestmentDropDownWebService.asmx" UseHttpGet="true"/>
<TargetControls>
<telerik:ToolTipTargetControl TargetControlID="link"></telerik:ToolTipTargetControl>
</TargetControls> </telerik:RadToolTipManager> </asp:LinkButton>