S
sck10
Hello,
I am trying to call a function (c#) from the repeater tool and I am not sure
if I am calling the function correctly (since I am not getting the results
that I want).
Using
<asp:Literal id="ltrNewLine" text='<%# vbBlankRowMenu("strMenuType") %>'
runat="server" />
should send the value "Title" or "Link" to the function and it should return
the string to create an empty cell.
When I added the "Eval" part, I got the error:
text='<%# vbBlankRowMenu(Eval("strMenuType")) %>'
The best overloaded method match for 'mpColumn0302.vbBlankRowMenu(string)'
has some invalid arguments
C:\Inetpub\wwwroot\gsttcsharp\template\mpColumn0302.master
Any help with this would be appreciated.
Thanks, sck10
<!-- Repeater: Menu Structure -->
<asp:Repeater id="rptMenu" runat="server">
<HeaderTemplate>
<table border="0px" style="width:99%">
</HeaderTemplate>
<ItemTemplate>
<asp:Literal id="ltrNewLine" text='<%# vbBlankRowMenu("strMenuType")
%>' runat="server" />
<tr>
<td style="width:100%; text-align:left;"><%#Eval("strTarget")%></td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater><br />
c# class
---------------------------------------------
public string strCategory = "NoParameter";
public string vbBlankRowMenu(string strRepeaterValue)
{
if (strRepeaterValue == "Title" && strCategory != "NoParameter")
{
strCategory = "Insert Line next time";
return "<tr><td width=600 colspan=3> </div></td></tr>";
}
else
{
strCategory = "Insert Line next time";
return null;
} // end if
}
I am trying to call a function (c#) from the repeater tool and I am not sure
if I am calling the function correctly (since I am not getting the results
that I want).
Using
<asp:Literal id="ltrNewLine" text='<%# vbBlankRowMenu("strMenuType") %>'
runat="server" />
should send the value "Title" or "Link" to the function and it should return
the string to create an empty cell.
When I added the "Eval" part, I got the error:
text='<%# vbBlankRowMenu(Eval("strMenuType")) %>'
The best overloaded method match for 'mpColumn0302.vbBlankRowMenu(string)'
has some invalid arguments
C:\Inetpub\wwwroot\gsttcsharp\template\mpColumn0302.master
Any help with this would be appreciated.
Thanks, sck10
<!-- Repeater: Menu Structure -->
<asp:Repeater id="rptMenu" runat="server">
<HeaderTemplate>
<table border="0px" style="width:99%">
</HeaderTemplate>
<ItemTemplate>
<asp:Literal id="ltrNewLine" text='<%# vbBlankRowMenu("strMenuType")
%>' runat="server" />
<tr>
<td style="width:100%; text-align:left;"><%#Eval("strTarget")%></td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater><br />
c# class
---------------------------------------------
public string strCategory = "NoParameter";
public string vbBlankRowMenu(string strRepeaterValue)
{
if (strRepeaterValue == "Title" && strCategory != "NoParameter")
{
strCategory = "Insert Line next time";
return "<tr><td width=600 colspan=3> </div></td></tr>";
}
else
{
strCategory = "Insert Line next time";
return null;
} // end if
}