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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

show message box based on result of query

Status
Not open for further replies.

skitty123

Technical User
May 4, 2004
56
US
I want to show a message box with a message based on a result of a query. how do I do this?
Currently I have the message displayed in a Label control on my ASP page, but a pop up message box woudl make more sense.

the query checks to see if some records exisr.
so here is what I want to do:
private void myButton_Click(.....)
{
if (noRecExist)
{
show message box "No records"
}else
{
message box "there are " + recordCount+ " records"
}
}

is this possible? I tried to add an onclick atribute to the button but that always shows before teh server code is executed not after
 
It's not possible to use Windows controls in a web form. You'll need to pop up a JavaScript dialog via
alert( "my message" )
or whatever.
 
Check out thread855-862103, or search this forum; there should be a bunch of similar threads out there,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top