Displaying the message in ASP.Net application

  • Thread starter Thread starter Cris Rock
  • Start date Start date
C

Cris Rock

In my ASP.Net application, validation rule demands that user has to select
one of the option buton(...WebControls.RadioButton).
I am doing these kind of validations in the server side when the user clicks
on the update button(...webControls.Button). My problem is how to display
this message to the end user. In a traditional desktop apllication i can
display the message usig message functions or modal forms. How to inform the
user that the validations got failed ?
Cris Rock
 
If you are controlling the validation completely, which it sounds like you
are, do the tests up front (in your button click). For failures, build a
string of errors. Then, quit processing and fill a label with errors.

Validation controls are much easier, and you can do some pretty amazing
validations with custom validators. They may or may not fit your
architecture (there are instances where they basically fail).

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

**********************************************************************
Think Outside the Box!
**********************************************************************
 
Hi Chris,
You can use validation controls,another alternative is if you want to
send a javascript for eg: an alert message from the
server side you can do that from the server side.Use Literalcontrol for
that.. For eg:

LiteralControl li=new LiteralControl();

li.Text="<script language='JavaScript'>alert('Test.');</script>";

Page.Controls.Add(li);

Hope this helps,
Regards,
Marshal Antony
..NET developer
htttp://www.dotnetmarshal.com
 
Back
Top