|
From: Mich on 4 Jul 2008 18:19 Hi, i made an application where a lot of radiobuttonlists are created dynamically. Some are visible and others are hidden until the right selectedvalue is chosen. Thsi works perfectly with IE7, Netscape, Firefox ...., but with IE6, there are big gaps between the radiobuttonlists. I looked at the source of both browser versions, but there is no difference. The difference is in the way of rendering the html code. I suspect that this line of the source: <div style="height:5px"> is interpreted differently. I tried with height:1px" but there was no difference in IE6. Only if i commented it the gap was closed. In IE7, this line creates a little gap between the two radios. I also noticed that a hidden radiobuttonlist is representd by this line (with 2 </di> !!) <div align="left" style="width:800px;height:0px"> <br></div></div> Here a sample of the code-behind: rb(i) = New RadioButtonList If Session("visible" & vlg) = "n" Then rb(i).Visible = False littd(i) = New LiteralControl("<div align=""left"" style=""width:800px;height:0px"">") Else littd(i) = New LiteralControl("<div align=""left"" style=""width:800px;background-color:lightsteelblue"">") End If frm.Controls.Add(littd(i)) If cond = False Then lit = New LiteralControl("<div style=""height:5px"">") frm.Controls.Add(lit) End If lit = New LiteralControl("</div>") frm.Controls.Add(lit) Thanks for help Mich
From: Christiano on 7 Jul 2008 10:09 how different is it being rendered??? if you set the height/width as 5px, ie7 will do it 5px while ie6 will stretch the div to the control size.. "Mich" <mich(a)nomaol.er> escreveu na mensagem news:e$aSAQi3IHA.3348(a)TK2MSFTNGP03.phx.gbl... > Hi, > > i made an application where a lot of radiobuttonlists are created > dynamically. Some are visible and others are hidden until the right > selectedvalue is chosen. Thsi works perfectly with IE7, Netscape, Firefox > ..., but with IE6, there are big gaps between the radiobuttonlists. > > I looked at the source of both browser versions, but there is no > difference. The difference is in the way of rendering the html code. > > I suspect that this line of the source: <div style="height:5px"> is > interpreted differently. I tried with height:1px" but there was no > difference in IE6. Only if i commented it the gap was closed. In IE7, this > line creates a little gap between the two radios. > > I also noticed that a hidden radiobuttonlist is representd by this line > (with 2 </di> !!) > > <div align="left" > style="width:800px;height:0px"> <br></div></div> > > Here a sample of the code-behind: > > rb(i) = New RadioButtonList > If Session("visible" & vlg) = "n" Then > rb(i).Visible = False > littd(i) = New LiteralControl("<div align=""left"" > style=""width:800px;height:0px"">") > Else > littd(i) = New LiteralControl("<div align=""left"" > style=""width:800px;background-color:lightsteelblue"">") > End If > frm.Controls.Add(littd(i)) > If cond = False Then > lit = New LiteralControl("<div style=""height:5px"">") > frm.Controls.Add(lit) > End If > lit = New LiteralControl("</div>") > frm.Controls.Add(lit) > > Thanks for help > > Mich > >
|
Pages: 1 Prev: FindControl problem Next: GetUser.ProviderUserKey gives me System.NullReferenceException |