Solved

What is the equivalent of javascript document.getElementById("table1").style.display = "block" in c#

Posted on 2008-10-01
1
907 Views
Last Modified: 2013-12-17
I have a javascript code as followed:
document.getElementById("table1").style.display = "block"

How do I translate into C#?

Thx.
0
Comment
Question by:fippif
1 Comment
 
LVL 5

Accepted Solution

by:
Rikus_Trent earned 500 total points
ID: 22619397
You'll need to make sure its a server control for asp.net to see it. Either use an asp.net control or at runat="server" to the existing element.

Then in your C# code you can access it as such:

myControl.Style["display"] = "block";
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now