I have a question regarding replace, I am populating values in word but some values I will not have available but if it does not fill in the word will be shown @@ VariableName, so I wanted to know if it has some general replace to put in the values that I do not I have at @@ variavelxpto the value "0.00"
if (row["id_evento"].ToString() == "8")
{
sbConteudo.Replace("@@fdfgertyer", row["VALOR"].ToString());
}
else if (row["id_evento"].ToString() == "10")
{
sbConteudo.Replace("@@zz", row["VALOR"].ToString());
}
else if (row["id_evento"].ToString() == "22")
{
sbConteudo.Replace("@@xsa", row["VALOR"].ToString());
}
else if (row["id_evento"].ToString() == "24")
{
sbConteudo.Replace("@@teste", row["VALOR"].ToString());
}
else if (row["id_evento"].ToString() == "98")
{
sbConteudo.Replace("@@VALOR_IDES_2", row["VALOR"].ToString());
}
else if (row["id_evento"].ToString() == "99")
{
sbConteudo.Replace("@@VALOR_IDES_1", row["VALOR"].ToString());
}
In the example I used say that I have event 24,10 and 99 then the variable @@ value_ides_2 and @@ test will be kept, but I need to put 0 there. In some cases the variable that will not be filled will be other then I do not have a default.