关于LinkButton的可见和onclik [英] About LinkButton's visible and onclik
问题描述
你好朋友,
我的链接按钮有问题,请帮我,我的问题是-
我的链接按钮是:
Inbox()
send mail()
draft()
checked Ails()
当我单击一个链接按钮(收件箱)时,它将重定向到收件箱,但其他三个按钮应该起作用,而单击的按钮收件箱则不起作用.
请帮助我和我这样做.
链接按钮enable =true
和click =false
上的按钮,但均不起作用,如果代码也在JavaScript中,请向我发送代码.
谢谢和问候,
Divya
Hello Friends,
I have a problem with my link button''s please help me my problem is -
My link button''s are:
Inbox()
send mail()
draft()
checked Ails()
When I am clicking the one link button(inbox), it redirect to inbox but other three buttons should work and the clicked button inbox should not work.
Please help me and im doing like this.
Link button enable =true
and on click =false
but its not working please send me the code if it is in JavaScript also.
Thanks and Regards,
Divya
推荐答案
<asp:LinkButton ID="Button1" runat="server" Text="Button1" onclick="Button1_Click" />
<asp:LinkButton ID="Button2" runat="server" Text="Button2" onclick="Button2_Click" />
protected void Button1_Click(object sender, EventArgs e)
{
Button1.Enabled = false;
Button2.Enabled = true;
}
protected void Button2_Click(object sender, EventArgs e)
{
Button2.Enabled = false;
Button1.Enabled = true;
}
希望这就是您想要的
Hope this is what u wanted
单击任何链接时.呼叫javascript.
1.使用链接名称在hiddenfield中设置任何指示器.
2.当您再次单击同一链接时,请检查hiddenfield值.如果与单击链接一样.只是返回false.
隐藏字段是客户端状态指示,在回发后保留数据.
When you click on any link. call javascript.
1. set any indicator in hiddenfield with link name.
2. when you again click on same link check for hiddenfield value. if it is same like clicked link. just return false.
hidden field is client side statemenegment, persist data after postback.
Koolprasad解决方案根据您的要求是很好的,此外,您可以执行以下操作:
在页面上设置任何状态.如果
Koolprasad solution is good according to your requirement and in additional you can do this :
set any status on page. if
lnkInbox_Click()
{
status=1;
//code here
}
else if()// add condition
{
////so on.
}
根据检查条件.并设置链接按钮visible = true或false.
如果您有任何疑问,请随时询问...
according to that check the condition. and set link button visible = true or false.
if you have any doubt then feel free to ask...
这篇关于关于LinkButton的可见和onclik的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!