473,320 Members | 1,949 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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

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

Aug 24 '05 #1
3 3665
....
<PARAM NAME="Level" VALUE="<%= newValue %>">
....

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

"Sachin_M" <Sa*****@discussions.microsoft.com> wrote in message
news:54**********************************@microsof t.com...
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
Aug 24 '05 #2
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

Aug 24 '05 #3
Hi

Thanks a lot Paulo,
it worked.....its working...

Thanks & Regards
Sachin M

"MstrControl" wrote:
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

Aug 25 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Xah Lee | last post by:
suppose you want to do find & replace of string of all files in a directory. here's the code: ©# -*- coding: utf-8 -*- ©# Python © ©import os,sys © ©mydir= '/Users/t/web'
12
by: Barnes | last post by:
Does anyone know of a good way to use the JavaScript string.replace() method in an ASP form? Here is the scenario: I have a form that cannot accept apostrophes. I want to use the replace() so...
3
by: John Smith | last post by:
Hi, I'm building a search engine for a site that uses HTML in the content management. I wanted to return search results but also filter out any HTML code that might interfere with the search...
2
by: Barnes | last post by:
Hi, Can anyone please tell me how I can use the replace method to replace a character if it occures in more than one textbox without having to write separate function for each textbox. The...
2
by: JHB | last post by:
Hi, How can I do a location.replace when I use a form, like when I use a href? This works. <a href="Ny HTML-side20.htm"; method="post" id="frm" name="BrugerHovedSide"...
7
by: Iain King | last post by:
I have some code that converts html into xhtml. For example, convert all <i> tags into <em>. Right now I need to do to string.replace calls for every tag: html = html.replace('<i>','<em>')...
5
by: Casey | last post by:
Hello, Can someone give me specific code to replace text on a page using server side javascript? I need to use server-side because I need the output to be recognized in the final HTML so that...
12
by: Michael | last post by:
In PHP there is a function called str_replace (http://php.net/str_replace). Basically you can freed in two strings and a "subject" string. Then it goes through the subject string searching for...
3
by: gregpinero | last post by:
Hi guys, What I'm trying to do is find all instances of an acronymn such as IBM on a webpage and replace it with <acronym title="International Business Machines">IBM</acronym>. However in my...
0
by: Xah Lee | last post by:
Interactive Find and Replace String Patterns on Multiple Files Xah Lee, 2006-06 Suppose you need to do find and replace of a string pattern, for all files in a directory. However, you do not...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.