Click here to Skip to main content
12,943,742 members (61,853 online)
Rate this:
 
Please Sign up or sign in to vote.
See more:
Hi , I have a div
as

<div id="divPagOfPage"  runat="server"></div>


i have made it invisible in clientside as

document.getElementById("divPagOfPage").style.display = "none";

Now i want again this div to be visible ,for this i have wrote code in codebehind
as
divPagOfPage.Style.Add("display", "inline");
  divPagOfPage.Visible = true;

and also
  ScriptManager.RegisterStartupScript(this, this.GetType(), "starScript", "ShowdivPagOfPage();", true);
function ShowdivPagOfPage(){
document.getElementById("divPagOfPage").style.display = "inline";
 
}


I tried all the three above code but still the div is invisible.How to make it visible in codebehind which is made invisible in cleintside.
Posted 4-Feb-13 20:12pm

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Hi,

Could you please try giving 'block' instead of 'inline',

document.getElementById(id).style.display = 'block';

Thanks,
B.S
  Permalink  
Comments
aassaahh 5-Feb-13 3:27am
   
still not working

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

    Print Answers RSS
Top Experts
Last 24hrsThis month
OriginalGriff 4,643
CHill60 2,970
Maciej Los 2,348
Jochen Arndt 1,900
ppolymorphe 1,765


Advertise | Privacy | Mobile
Web01 | 2.8.170518.1 | Last Updated 5 Feb 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100