show a message to user (WebApplication)

  • Thread starter Thread starter Marcos MOS
  • Start date Start date
M

Marcos MOS

Hi all,

I would like show a message to user when the function's result return
"false"... like this

....
if (! my_function(params))
showMessage("my string message");

so, How Can I do it? Like, send a window's message or opening an other
iexplorer sending the string message by parameter, like (in Javascript)
"window.open"...

thanks for all
Marcos
 
Marcos,

What information are you validating? If you can use the built in validation
controls they have a an option to show a validation summary either on the
page or in a pop up window.

If this isn't what you're looking for let me know. Your other option is to
write code on-the-fly to a window you open with javascript. I'll give you a
sample if you'd like.

--
S. Justin Gengo, MCP
Web Developer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
 
Hi,

thanks for your help...

so, I have a button im my aspx --> when the user click in that one, I do a
query in the database and if that returns a false result, like
if (myDataSet.Tables[0].Rows.Count > 1)
ShowMessage("User, you have already registered these
informations...")

Did you undertand me? That Message could be a window, or would be better if
I could show a simple message, like window.alert in JavaScript, but sending
my custom string message....

I'd like to receive your sample...

An other doubt, is... If I would like to do a question to user and depending
on the answer the Page do something, as follow the example:
if (showQuestion("Would you like to insert it?") == True)
this.insertFunction(params);

thanks a lot
Marcos
 
Marcos,

If the message is displayed to the user after a database query (which would
have to occurr on the server) a window.alert is the perfect way to go.

What you could do is attach it to an "onLoad" event in the body tag.

I have a bit of code on my website on how to do this.

Just go to www.aboutfortunate.com

The title you are looking for is: Use the "body" tag as a server control

If you filter the list for Web and VB.Net it will make it easier to find.
Sorry, but I haven't built the site's search function yet. But there isn't
much code in the library yet so it shouldn't be too hard to find.

--
S. Justin Gengo, MCP
Web Developer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
Marcos MOS said:
Hi,

thanks for your help...

so, I have a button im my aspx --> when the user click in that one, I do a
query in the database and if that returns a false result, like
if (myDataSet.Tables[0].Rows.Count > 1)
ShowMessage("User, you have already registered these
informations...")

Did you undertand me? That Message could be a window, or would be better if
I could show a simple message, like window.alert in JavaScript, but sending
my custom string message....

I'd like to receive your sample...

An other doubt, is... If I would like to do a question to user and depending
on the answer the Page do something, as follow the example:
if (showQuestion("Would you like to insert it?") == True)
this.insertFunction(params);

thanks a lot
Marcos


S. Justin Gengo said:
Marcos,

What information are you validating? If you can use the built in validation
controls they have a an option to show a validation summary either on the
page or in a pop up window.

If this isn't what you're looking for let me know. Your other option is to
write code on-the-fly to a window you open with javascript. I'll give
you
a
sample if you'd like.

--
S. Justin Gengo, MCP
Web Developer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
 
Back
Top