msyed1
asked on
VB.Net/ASP.Net - Programatically Enable HTML button
Hello,
I have a page that has both asp:buttons and HTML buttons. The page does a Search. When I first display the search page, all buttons (both asp and html) are disabled. See example below:
========================== ========== ========== ========== ========== ========
<asp:button id="BtnDelete" CommandName="Delete" tabIndex="15" runat="server" ForeColor="Crimson" Text=" Delete "
Enabled="False" CssClass="ButtonClass"></a sp:button>
<input class="ButtonClass" id="BtnDuplicate" onclick="javascript:BtnDup licate_Cli ck()" disabled tabIndex="16" type="button" value="Duplicate >>" width="70px">
<asp:button id="BtnClear" CommandName="Clear" tabIndex="17" runat="server" width="90px" Text="Clear Form"
Enabled="False" CssClass="ButtonClass"></a sp:button>
========================== ========== ========== ========== ========== =========
Once the Search is successful, I need to open up (Enable) all the buttons.
My question is on the HTML Input button (BtnDuplicate - the 2nd one above) which is set to 'disabled' in the .aspx. For ASP buttons, I know how to enable them (BtnDelete.Enabled = True), BUT HOW DO I PROGRAMATICALLY ENABLE A HTML BUTTON ???
I don't have an 'event' to go after either, the BtnDuplicate needs to be enabled after the search is performed and the record is successfully found on the database. Help, please...msyed1.
I have a page that has both asp:buttons and HTML buttons. The page does a Search. When I first display the search page, all buttons (both asp and html) are disabled. See example below:
==========================
<asp:button id="BtnDelete" CommandName="Delete" tabIndex="15" runat="server" ForeColor="Crimson" Text=" Delete "
Enabled="False" CssClass="ButtonClass"></a
<input class="ButtonClass" id="BtnDuplicate" onclick="javascript:BtnDup
<asp:button id="BtnClear" CommandName="Clear" tabIndex="17" runat="server" width="90px" Text="Clear Form"
Enabled="False" CssClass="ButtonClass"></a
==========================
Once the Search is successful, I need to open up (Enable) all the buttons.
My question is on the HTML Input button (BtnDuplicate - the 2nd one above) which is set to 'disabled' in the .aspx. For ASP buttons, I know how to enable them (BtnDelete.Enabled = True), BUT HOW DO I PROGRAMATICALLY ENABLE A HTML BUTTON ???
I don't have an 'event' to go after either, the BtnDuplicate needs to be enabled after the search is performed and the record is successfully found on the database. Help, please...msyed1.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Note that the variable should be Public...
<input class="ButtonClass" id="BtnDuplicate" onclick="javascript:BtnDup