1
protected void btnSave_Click(object sender, EventArgs e)
{
List<ProdutoAmortizacaoCreditoDias> aDay = new List<ProdutoAmortizacaoCreditoDias>();
ProdutoAmortizacaoCreditoDias ee = new ProdutoAmortizacaoCreditoDias();
if (ProcessingType == 1)
{
ee.Dia = this.txtDay.Text;
}
else
{
ee.Dia = this.lblDay.Text;
ee.FromProductID = this.hdnSourceID.Value;
ee.ToProductID = this.hdnDestinationID.Value;
}
The mistake is in:
ee.Dia = this.txtDay.Text;
Error:
Cannot implicitly Convert type 'string' to 'int'
I realize you can’t convert from string
for int
.
How can I turn this around?
What is the type of
ee.Day
? Put what it doesToInt32Nullable()
. What is the data that is trying to convert that gives this error?– Maniero
The data is int Dia, I’m trying to convert this because the goal is to fill the data and then save toInt32Nullable(), this wrong, I know.. instead of toint is text.
– Ricardo Gonçalves