ASP.NET TextBox - is it possible to initialize text attribute with in line code <% %>

前端 未结 5 948
傲寒
傲寒 2021-01-18 12:51


I need to initialize the text attribute of the text box element with a property from some where else when actually I can simply do this from code but it will be much m

5条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-18 13:50

    The short answer is NO, you can only use this kind of code with databindings, that means inside a GridView for example. But you can use this in the head section.

    I use it to prefix my urls sometimes with something predefined. Example

      
    

    In that case it works.

    Hope it helps.

提交回复
热议问题