本文介绍了方法'ToString'的重载没有接受'1'参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好..

我写了给定的代码,但出现错误方法'ToString'的无重载采用'1'参数",该行以粗体显示
anybory可以帮我改正吗..


hello ..

i write given code but i got error"No overload for method ''ToString'' takes ''1'' arguments" which displayed in bold line
can anybory help me to correct it..


<asp:TemplateColumn HeaderText="News Date" HeaderStyle-CssClass="dgHeaderItem">
                                       <HeaderStyle HorizontalAlign="Left" Width="25%"></HeaderStyle>
                                       <ItemStyle HorizontalAlign="Left" Width="25%"></ItemStyle>
                                       <ItemTemplate>
                                           <%#DataBinder.Eval(Container.DataItem,"newsdate").ToString(ConfigurationManager.AppSettings["DATE_FORMAT"].Replace("{0:", "").Replace("}", "")+ "," + ConfigurationManager.AppSettings["TIME+FORMAT"])%>
                                       </ItemTemplate>
                                   </asp:TemplateColumn>




谢谢..




Thank you..

推荐答案

narendrarathod写道:
narendrarathod wrote:

方法没有重载'' ToString''接受``1''自变量''

No overload for method ''ToString'' takes ''1'' arguments"





narendrarathod写道:
narendrarathod wrote:

DataBinder.Eval(Container.DataItem,"newsdate").ToString(ConfigurationManager.AppSettings ["DATE_FORMAT"].Replace("{0:,")

DataBinder.Eval(Container.DataItem,"newsdate").ToString(ConfigurationManager.AppSettings["DATE_FORMAT"].Replace("{0:", "")



错误本身是不言自明的.如果可以看到,则说明您正在执行以下操作:
abc.ToString(xyz.Replace())
这是错误的,不允许的.请更正此部分.



Error itself is self explanatory. If you can see, you are doing something like:
abc.ToString(xyz.Replace())
This is WRONG and not allowed. Please correct this part.



这篇关于方法'ToString'的重载没有接受'1'参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-30 23:30