Hullo Good Friends,
I am back again seeking help. Please help me.
I am using C#NET2008 Window Application, This is the situation. Should either one of this control, txtXMLFolder.Te xt , txtXMLName.Text , lblCustID.Text is BLANK, It should not activate FCreateXMLFile( ) Function.
I am using IF Statement to validate data and it generate this error message to my surprise.
Error 2 Operator '||' cannot be applied to operands of type 'bool' and 'string'
This is the coding that I tried to:
I am back again seeking help. Please help me.
I am using C#NET2008 Window Application, This is the situation. Should either one of this control, txtXMLFolder.Te xt , txtXMLName.Text , lblCustID.Text is BLANK, It should not activate FCreateXMLFile( ) Function.
I am using IF Statement to validate data and it generate this error message to my surprise.
Error 2 Operator '||' cannot be applied to operands of type 'bool' and 'string'
This is the coding that I tried to:
Code:
private void btnXML_Click(object sender, EventArgs e)
{ //validate data pior to create XML File
if ((this.txtXMLFolder.Text == "" ) || (this.txtXMLName.Text == "") || (this.lblCustID.Text = ""))
{
string txtmsg = "Either one of these data is missing" + "\n";
txtmsg += "Customer Selection" + "\n";
txtmsg += "XML File Creation" + "\n";
txtmsg += "Select XML Stored Folder";
MessageBox.Show(txtmsg, "XML Creation Cancelled ");
}
else
{//create XML File
FCreateXMLFile();
}
} // end btnXML
Comment