Enable a button when all three text boxes are filled data
its looking old now bt for those searching still on this thread
create method/function seperatly i call it "ckFields()"
Private Sub ckFields()
if textbox1.text <> "" and textbox2.text <> "" and textbox3.text <> "" then
Button1.Enabled = True
Button1.Enabled = False
'Set AutoPostBack="true" for all textboxes
'now call method/function on EVERY textBox's Text change Event
Protected Sub textbox1_TextChanged(ByVal...)
Protected Sub textbox2_Te...
Protected Sub textbox3_Te... and so on..
This might help
> On Thursday, February 25, 2010 2:44 PM aspfun via DotNetMonster.com wrote:
> In a web page, there are three text boxes and one button (enable=false).
> When page load, I used javascrip to paste some info to fill out three text
> boxes from clipboard in which another program will copy to.
> How to code to make the button enable = true only when all thee text boxes
> are filled?
> I tried to add code below at end of page_load but do not work.
> if textbox1.text <> "" and textbox2.text <> "" and textbox3.text <> "" then
> button1.enable = true
> Message posted via DotNetMonster.com
>> On Thursday, February 25, 2010 6:42 PM Nathan Sokalski wrote:
>> First of all, do you want to do this check client or server side? It sounds
>> you do it server-side in the Load event, the values of the TextBoxes' Text
>> properties must be set before doing the check, and the Button's status will
>> not change once the Page is rendered (unless you have something other
>> client-side code that changes the Button's status). Please clarify exactly
>> what you want.
>> Nathan Sokalski
>> Submitted via EggHeadCafe - Software Developer Portal of Choice
>> Simple .NET HEX PixelColor Utility
|All times are GMT. The time now is 01:09 AM.|
Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.