如果我单击 ListView 中的按钮,我想打开 Outlook。这怎么...
<a href="mailto:user@example.com">Send email to user@example.com</a>
我有一个 ...
<asp:LinkButton ID="LinkButton1" runat="server">LinkButton</asp:LinkButton>
没有网址。Url 从 ListView 获取此 LinkButton 并且它可以工作,但在此之后我无法激活此 LinkButton :(
这怎么...
protected void myListView_ItemCommand(object sender, ListViewCommandEventArgs e)
{
if (e.CommandName == "mailto")
{
int index = Convert.ToInt32(e.CommandArgument);
LinkButton lb = (LinkButton)myListView.Items[index].FindControl("Label2");
string mailto = lb.Text;
LinkButton1.PostBackUrl = "mailto:" + mailto;
LinkButton1.ResolveClientUrl("mailto:" + mailto); //Here?????
}
}
如何在不单击此按钮的情况下激活 LinkButton?