how to replace HTML through ASP.NET (C#)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

HI,

I want to replace a PARAM value on every page load (or refresh).
my HTML code is something like this:

<form id="Form1" method="post" runat="server">
<OBJECT id="ShowLevel" classid="clsid:9F2B3505-199C-11D2-9E4E-00AA002156AE"
VIEWASTEXT>
<PARAM NAME="Level" VALUE="36">
...
</OBJECT>

I want to change VALUE to any integer, but with code behind (C#) only.
Please guide.

Regards,
Sachin M
 
....
<PARAM NAME="Level" VALUE="<%= newValue %>">
....

Where newValue is declared and assigned a value in the code-behind.

HI,

I want to replace a PARAM value on every page load (or refresh).
my HTML code is something like this:

<form id="Form1" method="post" runat="server">
<OBJECT id="ShowLevel" classid="clsid:9F2B3505-199C-11D2-9E4E-00AA002156AE"
VIEWASTEXT>
<PARAM NAME="Level" VALUE="36">
...
</OBJECT>

I want to change VALUE to any integer, but with code behind (C#) only.
Please guide.

Regards,
Sachin M
 
Hi Siva and Sachin,

The problem with this approach is that IF the variable resides on the
CodeBehind it won't work.

You need to aim a little lower to hit the target.

Check the documentation on Databindings and use Page.Databind()
function to change everything you need on the page.

Regards,

Paulo
 
Back
Top