Click here to Skip to main content
15,906,335 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
Hi,

I have a div tag, eg:

HTML
<div id="someid" style="width:10px;height:20px;border:solid blue 1px">some content</div>


inside the div tag is a fileupload button,

On page load I want to hide the div and the fileupload button.

I am using an image onmouseclick to fire :

using jquery to unhide the div
use code behind to set the button visibility to true (C#)

How can you use jquery and also c# code behind at the same time to accomplish this ?

I am also getting errors trying to hide the div with jquery in my ASPX html:

I am using
HTML
<script type="text/javascript">{$('someid').hide();}</script>


Any resolutions would be appreciated:

Thanks,


[edit]Code block added, HTML encoded - OriginalGriff[/edit]
Posted
Updated 22-Sep-12 22:25pm
v2

1 solution

in client side use javascript :
JavaScript
document.getElementById("BodyMainContent").style.visibility="hidden";


in server side using c# first replace panel instead of div:
1- if you need ajax you should first have a script manager and define a trigger for mouseclick event then add runat="server" to panel tag then use this code :
C#
Panel1.visible=False


2- if you dnt need ajax so just add same code :
C#
Panel1.visible=False
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900