Replace function in DataList from vb to c#

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>
 
C

Cowboy \(Gregory A. Beamer\)

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!
*************************************************
 
S

sck10

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!
*************************************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top