ASP->ASP.NET conversion of document.title and document.getElementById - C# newbie.

  • Thread starter Thread starter Frank Nero
  • Start date Start date
F

Frank Nero

In my ASP HTML code I have:

<SCRIPT language=JavaScript>
<!--
function DispTitle()
{
document.title = "New Title";
...
document.getElememtByID("par1").innerHTML = "New Text of the
Paragraph";
}
//-->
</SCRIPT>

How to acomplish the same effects inside C# code-behind function?
Does System.Web.UI:Page class can do that?
How to access any element of the page (document) from C# ?

Thank you in advance,

Frank.
 
hi
all elements inside the page are objects of the
System.Web.UI.WebControls namespace , they have all kind of prosperities
that you can access from he code behind page . they are all listed ( you
can reference them this way also ) into the controls collection of the Page
Object (page.Controls).
Mohamed Mahfouz
MEA Developer Support Center
ITworx on behalf of Microsoft EMEA GTSC
 

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

Back
Top