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

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
 
S

Siva 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
 
M

MstrControl

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
 

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

Top