Converting value of an Eval from int to string

后端 未结 3 986
广开言路
广开言路 2021-01-12 21:40

I have an integer stored in my database that I need to convert string.

This is my attempt at the Eval:

<%# ChangeSalaryType(Eval(\"SalaryType\"))          


        
3条回答
  •  误落风尘
    2021-01-12 22:07

    Try to convert to int on your Eval part;

    Convert.ToInt32(Eval("SalaryType"))
    

    Eval probably return object as a return type.

提交回复
热议问题