Click here to Skip to main content
15,894,291 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
protected void butSubmit_Click(object sender, EventArgs e)
{
if (txtClientContactemailid.Text != "" && txtClientcontactname.Text != "")
{
ClientContactPersonBO obj = new ClientContactPersonBO();
DataSet ds = new DataSet();
obj.Email = txtClientContactemailid.Text;
ds = obj.CheckClientExist();

if (ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
{

lblerror.Attributes.Remove("style");
lblerror.Attributes.Add("style", "display:block; color:red");
}

}

What I have tried:

ds.Tables[0].Rows.count>0 showing count=0
Posted
Updated 1-Jul-16 1:49am
Comments
OriginalGriff 1-Jul-16 7:33am    
And your question is?
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind.
Use the "Improve question" widget to edit your question and provide better information.
Member 10549697 1-Jul-16 8:27am    
I'm extremely sorry sir.actually it was the problem in my database.sorry for bothering you

1 solution

If ds has no rows in the table that is something only you can figure out because we do not have access to your code or your machine to run this. However, to track it down you'll need to look at obj.CheckClientExist() since that is what appears to be filling in your ds DataSet object.
 
Share this answer
 
Comments
Member 10549697 1-Jul-16 8:27am    
I'm extremely sorry sir.actually it was the problem in my database.sorry for bothering you
ZurdoDev 1-Jul-16 8:29am    
No bother at all. Glad you tracked it down.

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900