Click here to Skip to main content
Sign Up to vote bad
good
See more: ASP.NET
i have a grid inside i have 3 bound columns
1.empid
2.empno(editable)
3.empname
 
empno should allow only 20,21 ,if i enter not 20,21 then i want to show error message
dim x as boolean=false
so in row updating event
if(empno==20 ||empno==21)
{
   //implementation
   x=true
}
if(x=false)
{
   lblmessage.text="please enter 20,21."
}
problem is lblmessage is was not displaying the text in runtime. please help me
Posted 4 Oct '12 - 4:18
Edited 4 Oct '12 - 4:25

Comments
DaveAuld - 4 Oct '12 - 10:47
Where are you trying to perform this? What language are you trying to do this in? you have a right mishmash of things going on, and it is not clear.

1 solution

Look at your code to test x, you are assigning a value not testing a value;
if (x=false)
 
You should have;
if (x==false)
  Permalink  
Comments
sai.2012 - 4 Oct '12 - 10:32
if(x=false)then lblmessage.text="" end if
ridoy - 4 Oct '12 - 16:15
+5

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 8,356
1 OriginalGriff 6,571
2 CPallini 3,533
3 Rohan Leuva 2,703
4 Maciej Los 2,234


Advertise | Privacy | Mobile
Web01 | 2.6.130516.1 | Last Updated 4 Oct 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid