Forums » .NET » .NET »

Clear TextBox


Posted Date: 04 Feb 2006      Posted By:: manish jain Profile photo    Member Level: Silver    Member Rank: 2380     Points: 2   Responses: 4



HOw can i clear multiple textboxes on a single click? Rember Textboxes are in a group box.



Responses

#40551    Author: krishnakumar      Member Level: Bronze      Member Rank: 0     Date: 04/Feb/2006   Rating: 2 out of 52 out of 5     Points: 2

on click the event fires
textbox1.text=""
textbox2.text=""
.
.
.


 
#40554    Author: kiran      Member Level: Bronze      Member Rank: 0     Date: 04/Feb/2006   Rating: 2 out of 52 out of 5     Points: 2

function clear(id as string)
id.clear
end function


for i =1 to 50
clear(pass the text box id)
next


 
#40661    Author: Ramana      Member Level: Gold      Member Rank: 0     Date: 06/Feb/2006   Rating: 2 out of 52 out of 5     Points: 2

hi u can write a function for clear text boxes

like

Private Sub ClearTextBoxes()
Textbox1.clear
Textbox2.Clear
..
..
..
..
End Sub

after u can call this function in u r project any where





 
#125550    Author: sanjay kumar      Member Level: Bronze      Member Rank: 0     Date: 25/May/2007   Rating: 2 out of 52 out of 5     Points: 2

dim obj as gropbox1
dim ctrl as control
foreach ctrl in obj.controls
if typeof ctrl is textbox
ctrl.tex =""

end if

next


 
Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.



Next : Is there any expert to solve this?
Previous : what is difference between String and string(data type) in c#?
Return to Discussion Forum
Post New Message
Category: .NET

Related Messages

Subscribe to Subscribers
Active Members
TodayLast 7 Daysmore...

Awards & Gifts
Talk to Webmaster Tony John

Online Members

Vivek Desai
More...
Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India