Creating user control/custom image control to handle multilingual site

  • Thread starter Thread starter SamIAm
  • Start date Start date
S

SamIAm

Hi There

I need to create either a user control or custom control to replace my image
controls. I need to be able to dynamically assign a id and file name to the
control before rendering it.

Any help appreciated,

S
 
Why can't you just use server side img? Like this:

<script language="C#" runat="server">
public void Page_Load(Object sender, EventArgs e)
{
Img.src = "Whatever.png"; // Put your logic here to assign the source
url
}
</script>
<img id="Img" src="~/default.png" runat="server" />

The id should stay the same as the image should have the same meaning in
different languages, much like a header is always a header regardless if
it's in English or Japanese.

Jerry
 
Back
Top