Replace function in DataList from vb to c#

  • Thread starter Thread starter sck10
  • Start date Start date
S

sck10

Hello,

I am converting a DataList from vb to c#. I am having a problem converting
the Replace function to c#. Any help with this would be appreciated.

<asp:DataList id="dlstPhotoGallery" Runat="Server"
RepeatDirection="Horizontal">
<ItemTemplate>
<a href='<%# Replace(Container.DataItem,"_mini","") %>' target="_blank">
<asp:Image ID="imgPhotoGallery" ImageUrl='<%# Container.DataItem %>'
ToolTip='<%# Mid(Container.DataItem, InStrRev(Container.DataItem, "/")
+ 1) %>' Runat="Server" />
</a>
</ItemTemplate>
</asp:DataList>
</asp:Panel>
 
StringName.Replace("_mini", "")

By the way, an easy way to convert is downloading Reflector (Lutz Roeder's
tool). Compile the VB project and open the DLL in Reflector. Double click
the routine and look at the C# code. To do this with declarative code, you
will have to move the bits to CodeBehind (or a console project). THen, you
can examine it in C# (or even Delphi ;-)).

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
Think outside of the box!
*************************************************
 
Thanks Gregory. I'll check out the "Reflector"

Cowboy (Gregory A. Beamer) said:
StringName.Replace("_mini", "")

By the way, an easy way to convert is downloading Reflector (Lutz Roeder's
tool). Compile the VB project and open the DLL in Reflector. Double click
the routine and look at the C# code. To do this with declarative code, you
will have to move the bits to CodeBehind (or a console project). THen, you
can examine it in C# (or even Delphi ;-)).

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
Think outside of the box!
*************************************************
 
Back
Top