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
http://www.dotnetmonster.com/Uwe/Forums.aspx/asp-net-web-controls/201002/1
"aspfun via DotNetMonster.com" <u53138@uwe> wrote in message
news:a42a343c6e1be@uwe...
create method/function seperatly i call it "ckFields()"
Private Sub ckFields()
if textbox1.text <> "" and textbox2.text <> "" and textbox3.text <> "" then
Button1.Enabled = True
Else
Button1.Enabled = False
End If
End Sub
'Set AutoPostBack="true" for all textboxes
'now call method/function on EVERY textBox's Text change Event
Protected Sub textbox1_TextChanged(ByVal...)
ckFields()
End Sub
Protected Sub textbox2_Te...
Protected Sub textbox3_Te... and so on..
This might help
Thank you
>> 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
>> like something that you would want to do client-side using JavaScript. If
>> 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
>> njsok...@hotmail.com
>> http://www.nathansokalski.com/
>> Submitted via EggHeadCafe - Software Developer Portal of Choice
>> Simple .NET HEX PixelColor Utility
>> http://www.eggheadcafe.com/tutorials/aspnet/5617a491-963d-4510-b8f1-1863ddf52bc1/simple-net-hex-pixelcolor-utility.aspx