Click here to Skip to main content
15,923,281 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionNeed Suggestion Pin
amarnath n.n27-Aug-09 6:05
amarnath n.n27-Aug-09 6:05 
AnswerRe: Need Suggestion Pin
Jay Royall27-Aug-09 6:26
Jay Royall27-Aug-09 6:26 
GeneralRe: Need Suggestion Pin
amarnath n.n27-Aug-09 13:21
amarnath n.n27-Aug-09 13:21 
GeneralRe: Need Suggestion Pin
N a v a n e e t h27-Aug-09 19:52
N a v a n e e t h27-Aug-09 19:52 
QuestionRetaining focus after postback Pin
rcampbell1227-Aug-09 6:04
rcampbell1227-Aug-09 6:04 
AnswerRe: Retaining focus after postback Pin
Jeremy Likness27-Aug-09 6:17
professionalJeremy Likness27-Aug-09 6:17 
GeneralRe: Retaining focus after postback Pin
rcampbell1227-Aug-09 6:33
rcampbell1227-Aug-09 6:33 
GeneralClient side validation is the way to go - Example given Pin
David Mujica27-Aug-09 7:43
David Mujica27-Aug-09 7:43 
Checking for blank fields, etc should definetly be done on the client side.

Here is an example Javascript validation routine:

function valToFormulator() {
  // alert(document.getElementById('<%=tbxCustomerID.ClientID%>').value);
  
  if ((document.getElementById('<%=tbxCustomerID.ClientID%>').value == "") ||
    (document.getElementById('<%=tbxContactID.ClientID%>').value == "")) {
    alert("You must select a contact before sending to the flavor chemist.");
    return false;
  }
  else
    return true;
}


On the ASP.NET button, I have the following attribute:
OnClientClick="return valToFormulator();"

If the validation routine returns a "false", then the PostBack does not occur and the validation routine displays the Popup alert box with the error message.


Have your programmer try it out on a simple field validation where a field cannot be blank. You will be much happier with the performance. Thumbs Up | :thumbsup:
Questionupload and download Pin
hasani200727-Aug-09 5:15
hasani200727-Aug-09 5:15 
AnswerRe: upload and download Pin
Abhishek Sur27-Aug-09 5:33
professionalAbhishek Sur27-Aug-09 5:33 
AnswerRe: upload and download Pin
Abhijit Jana27-Aug-09 9:20
professionalAbhijit Jana27-Aug-09 9:20 
GeneralRe: upload and download Pin
Robert_Pan27-Aug-09 14:26
Robert_Pan27-Aug-09 14:26 
QuestionProblem in DateTime conversion!! Please help Pin
skhan1727-Aug-09 4:56
skhan1727-Aug-09 4:56 
AnswerRe: Problem in DateTime conversion!! Please help Pin
DoctorMick27-Aug-09 5:01
DoctorMick27-Aug-09 5:01 
GeneralRe: Problem in DateTime conversion!! Please help Pin
skhan1727-Aug-09 5:17
skhan1727-Aug-09 5:17 
GeneralRe: Problem in DateTime conversion!! Please help Pin
Jeremy Likness27-Aug-09 6:18
professionalJeremy Likness27-Aug-09 6:18 
AnswerRe: Problem in DateTime conversion!! Please help Pin
Robert_Pan27-Aug-09 14:24
Robert_Pan27-Aug-09 14:24 
QuestionHTML Input Box Dynamically set default value Pin
dptalt27-Aug-09 3:43
dptalt27-Aug-09 3:43 
AnswerRe: HTML Input Box Dynamically set default value Pin
Coding C#27-Aug-09 4:02
Coding C#27-Aug-09 4:02 
GeneralRe: HTML Input Box Dynamically set default value Pin
dptalt27-Aug-09 4:44
dptalt27-Aug-09 4:44 
GeneralRe: HTML Input Box Dynamically set default value Pin
Coding C#27-Aug-09 21:07
Coding C#27-Aug-09 21:07 
AnswerRe: HTML Input Box Dynamically set default value Pin
Robert_Pan27-Aug-09 14:32
Robert_Pan27-Aug-09 14:32 
GeneralRe: HTML Input Box Dynamically set default value Pin
Robert_Pan27-Aug-09 14:33
Robert_Pan27-Aug-09 14:33 
QuestionCustom Paging Pin
.NET- India 27-Aug-09 3:10
.NET- India 27-Aug-09 3:10 
AnswerRe: Custom Paging Pin
Coding C#27-Aug-09 4:01
Coding C#27-Aug-09 4:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.