c# - How to show two columns of data using a Repeater control -
i have been working on dnn site, visual studio 2012, visual basic, c#. have user control shows logo , several other lines using repeater:
<asp:panel runat="server" id="pnlpubic"> <style> div.corporatetext{ width: 900px; margin-top: 25px;} div.corptitle{ font-size:20px; font-weight:bold; color: #ff0000; margin: 15px 10px 10px 10px; text-align:left; } div.corptext{ text-align:left; margin: 5px 10px; line-height: 22px; } div.corpbox{ margin: 5px auto 45px; border: solid 1px #ccc;width: 340px; text-align:center;} img.corplogohorizontal{ margin: 0px auto; padding: 5px; width: 320px; } img.corplogovertical{ margin: 0px auto; padding: 5px; width: 320px; } div.corplogoboxhorizontal{ text-align:center; margin: 0 auto;} div.corpbox {color: #009aca;} </style> <asp:repeater runat="server" id="rptcorporations"> <headertemplate> <div class="corporatetext"> </headertemplate> <itemtemplate> <div class="corpbox"> <%#if(not isdbnull(eval("logo")) = true andalso eval("logo").tostring().length > 0, createlogodiv(eval("logo")), string.empty)%> <div class="corptitle"><%#eval("name")%></div> <div class="corptext"> <%#iif(eval("address").tostring().length > 0, string.format("<br />{0}", eval("address")), string.empty)%> <br /><%#iif(eval("city").tostring().length > 0, string.format("{0}, ", eval("city")), string.empty)%> <%#iif(eval("zip").tostring().length > 0, string.format("{0}, ", eval("zip")), string.empty)%> <%#iif(eval("statename").tostring().length > 0, string.format("{0}, ", eval("statename")), string.empty)%> <%#iif(eval("countryname").tostring().length > 0, string.format("{0}", eval("countryname")), string.empty)%> <%#iif(eval("phone").tostring().length > 0, string.format("<br />phone: {0}", eval("phone")), string.empty)%> <%#iif(eval("fax").tostring().length > 0, string.format("<br />fax: {0}", eval("fax")), string.empty)%> <%#iif(eval("cell").tostring().length > 0, string.format("<br />cell phone: {0}", eval("cell")), string.empty)%> <%#iif(eval("website").tostring().length > 0, string.format("<br /><a href='{0}' target='_blank'>{1}</a>", eval("website"), eval("website").tostring().replace("http://", string.empty)), string.empty)%> <%#iif(eval("email").tostring().length > 0, string.format("<br /><a href='mailto:{0}' class='blue'>{0}</a>", eval("email")), string.empty)%> <%#if(not isdbnull(eval("description")), string.format("<p>{0}</p>", system.web.httputility.htmlencode(eval("description"))), string.empty)%> </div> </div>
i have show these data in 2 columns (with 2 divs float left , float right). have prepared html code show data without repeater:
<style type="text/css"> .lmemberdivholder { width:250px; float: left; } .rmemberdivholder { width:250px; float: right; } div.corptitle { font-size: 20px; font-weight: bold; color: #ff0000; margin: 15px 10px 10px 10px; text-align: left; } div.corptext { text-align: left; margin: 5px 10px; line-height: 22px; } div.corpbox a:active { color: #036; } img.corplogovertical { margin: 0px auto; padding: 5px; width: 320px; } .lineholder { clear: both; } img.corplogohorizontal { margin: 0px auto; padding: 5px; width: 320px; } div.corpbox { border: 1px solid #bfbfbf; margin: 5px 50px 50px 45px; text-align: center; width: 340px; } .logoholder { width: 340px; height: 220px; } .logoholder1 {width: 340px; height: 70px; } </style> <div id="wrap1"> <div class="lineholder"> <div class="lmemberdivholder corpbox"> <div class="logoholder"> <img class="corplogovertical" style="height: 174px; width: 253px;" src="/portals/0/igd/archive/corporation/thumbs/cusersvalterpicturesofficial2015ealogoe1421343758675.png" /> </div> <div class="titleholder">ecmo advantage</div><br /> <div class="descholder"> 407 haynes haven lane<br /> murfreesboro, 37129, tennessee, united states <br /> phone: 615-556-5578 <br /> fax: 877-740-ecmo <br /> <a class="blue" href="http://www.ecmoadvantage.com" target="_blank">www.ecmoadvantage.com</a> </div> </div> <div class="rmemberdivholder corpbox"> <div class="logoholder"> <img class="corplogovertical" src="/portals/0/igd/archive/corporation/thumbs/cusersvalterdownloadslogoorigen.png" /> </div> <div class="corptitle">origen biomedical, inc.</div><br /> <div class="corptext"> 7000 burleson rd, bldg d <br /> austin, texas, united states<br /> phone: +1.512.474.7278 <br /> fax: +1.512.617.1503 <br /> <a class="blue" href="http://www.origen.com" target="_blank">www.origen.com</a> </div> </div> </div> <div class="lineholder"> <div class="lmemberdivholder corpbox"> <div class="logoholder1"> <img class="corplogohorizontal" src="/portals/0/igd/archive/corporation/thumbs/cusersvalterpicturesheaderlogo.png" /> </div> <div class="corptitle">st. jude medical</div><br /> <div class="corptext"> 6035 stoneridge dr <br /> pleasanton, 94588, california, united states<br /> phone: 925-847-8600<br /> <a class="blue" href="http://www.sjm.com/thoratec" target="_blank">www.sjm.com/thoratec</a> </div> </div> <div class="rmemberdivholder corpbox"> <div class="logoholder1"> <img class="corplogovertical" src="/portals/0/igd/archive/corporation/thumbs/cusersvalterpictureslogoph01.gif" /> </div> <div class="corptitle">terumo cardiovascular systems</div><br /> <div class="corptext"> 6180 jackson rd<br /> ann arbor, 48103, michigan, united states<br /> phone: 734.663.4145<br /> fax: 734.663.7981<br /> <a class="blue" href="http://www.terumo.com" target="_blank">www.terumo.com</a> </div> </div> </div> </div> <div class="lineholder"> <div class="lmemberdivholder corpbox"> <div class="logoholder1"> <img class="corplogohorizontal" src="/portals/0/igd/archive/corporation/thumbs/cusersvalterdownloadsvtidtaghorzrgb.jpg" /> </div> <div class="corptitle">vital therapies, inc.</div><br /> <div class="corptext"> 15010 avenue of science ste 200<br /> san diego, 92128-3421, california, united states<br /> phone: 8586736840<br /> <a class="blue" href="http://www.vitaltherapies.com" target="_blank">www.vitaltherapies.com</a><br /> <a class="blue" href="mailto:jguzman@vitaltherapies.com">jguzman@vitaltherapies.com</a> </div> </div> </div> </div>
how can show these data using repeater in 2 columns? thank in advance help.
Comments
Post a Comment