View Single Post
  #1 (permalink)  
Old October 10th, 2007, 05:16 AM
MunishBhatia MunishBhatia is offline
Friend of Wrox
Join Date: Aug 2006
Location: Bangalore, Karnataka, India.
Posts: 231
Thanks: 0
Thanked 1 Time in 1 Post
Default text box empty problem


i am using gridview and in Rowupdating event using following code:

protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)


objCallerListUserMaster.PhoneOne = (((TextBox)GridView1.Rows[e.RowIndex].FindControl("txtPhoneOne")).Text).ToString();

string FinalPhoneNumber1 = "";

if ((objCallerListUserMaster.PhoneOne != "") || (objCallerListUserMaster.PhoneOne != null))


Do something.




lblValidUpdateNumber.Visible = true;

lblValidUpdateNumber.Text = "Please enter valid phone number or numbers in update. please try again.";


My problem is even textbox is empty and i did not enter any thing, it bypass my condition and execute "Do Something"

objCallerListUserMaster.PhoneOne shows ''''' in it but in visualizer it is empty please help