On Buton Click event You can Declare Three Variable Like Below
protected void Buton _Click(object sender, EventArgs e)
{
String xx;
String YY;
String ZZ;
if(txtbox1.text!='')
{
xx=txtbox1.text;
}
if(txtbox2.text!='')
{
YY=txtbox2.text;
}
if(txtbox3.text!='')
{
ZZ=txtbox3.text;
}
}