Hello all,
I have a linkbutton that opens a modalpopupextender. User will be able to enter an amount and click submit which will close the modalpopup and update the linkbutton text to that of the input amount, eg: 20.50 KG (codes not shown here to avoid confusion).
The user will have the ability to clear their input amount by clicking on the clear button.
There is another button called the done button beside the clear button. As there will be many rows in the table, the purpose of this done button is to indicate to the user that the particular row has been completed. By clicking the done button, it will disable the clear button as well as the linkbutton which opens up the modalpopupextender. By clicking on the done button again, it should enable both the clear and linkbutton again.
As of now, I can successfully disable the clear button but I can't seem to disable the linkbutton. I thought of changing the TargetControlID to "btnCancel" since I already disabled the clear button. However, this is not working and I do not know if it is the correct approach.
I researched on disabling/changing the targetcontrolid but most points to prevent double-clicking which is not exactly what I need.
(Ps: It will be great if someone can also give me some advice on how to show a clear indication that the particular row is completed and revert the changes upon clicking done again. If it is not appropriate to ask this question here then its okay :)
<asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server" BackgroundCssClass="modalBackground" PopupControlID="pnModelPopup" TargetControlID="lnkbtnSignin" BehaviorID="modal" CancelControlID="btnCancel"></asp:ModalPopupExtender><tr><td>Something 1</td><td><asp:label id="qty" runat="server" text="87.984"></asp:label></td><td><asp:LinkButton ID="lnkbtnSignin" runat="server" Text="<Enter an amount>"></asp:LinkButton></td><td><asp:Button ID="Clear" runat="server" Text="✗" BorderStyle="Inset" BorderColor="Black" BackColor="LightPink" CssClass="icon-arrow-left" OnClick ="clearAmount"></asp:Button>   <asp:Button ID="Done" runat="server" Text="✓" BorderStyle="Inset" BorderColor="Black" BackColor="PaleGreen" CssClass="icon-arrow-right" OnClick="productFinish"></asp:Button></td></tr></tr> //codebehind Protected Sub productFinish(ByVal sender As Object, ByVal e As EventArgs) Clear.Enabled = False ModalPopupExtender1.TargetControlID = "btnCancel" End Sub Protected Sub clearAmount(ByVal sender As Object, ByVal e As EventArgs) lnkbtnSignin.Text = "<Enter an amount>" lnkbtnSignin.ForeColor = Drawing.Color.CornflowerBlue inputTotalWeight.Text = "" End Sub
Thank you!