Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling SUB after Search 1

Status
Not open for further replies.

net123

Programmer
Oct 18, 2002
167
US
I have a Web Form that searches and displays records via a datagrid. On Page_Load I have two buttons: Search and Reset. Upon returning the results, I would like another button to be displayed, i.e. Export. I created a SUB btnExport_OnClick, but I am having trouble calling AFTER it searches. I was thinking of putting in my SUB btnSearch_OnClick, but I think my syntax is wrong.

Your suggestions will be greatly appreciated.
 
Code:
btnSearch_OnClick
   'do stuff
   btnExport.enabled = true
   'call myFunction()
end sub


btnExport_OnClick
   'call myFunction()
end sub


private sub myFunction()
   'do stuff
end sub
 
BoulderBum:

Thanks for your help. I am almost there. What I would actually to happen is that on Page_Load, I want the btnExport not be displayed.

I tried the following but the button is still there:

btnExport.enabled = False
[/red]

Your following code is exactly what I was looking for:

btnSearch_OnClick
'do stuff
btnExport.enabled = true
'call myFunction()
end sub
[/blue]
Any other suggestions would greatly be appreciated.
 
Glad to know I could be of assistance.

If you want the button to disappear completely, manipulate the Visible property instead of Enabled.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top