Concatenate text with Eval

后端 未结 6 466
太阳男子
太阳男子 2020-12-05 10:09

How to concatenate static text in the start of Eval(\"\") in asp.net?

6条回答
  •  萌比男神i
    2020-12-05 10:40

    Here is a good method I am using whereby I want to Concatenate a string to an Eval and use in the CommandArgument of a LinkButton.

    Append string to start

    CommandArgument='<%# String.Format(string.Concat("TextString", Eval("DBValue")))%>'
    

    Append string to end

    CommandArgument='<%# String.Format(string.Concat(Eval("DBValue"), "TextString"))%>'
    

提交回复
热议问题