User61956409 posted
Hi prasadbvm,
I see the below format is displayed. Is there a way, I can display both placeholders side by side ?
To display the dynamic content (label and image) side by side, you can try to add them to a Panel first, and specify
CssClass for that Panel to control the displaying of the content.
Panel pn1 = new Panel();
pn1.CssClass = "items";
Label lbl1 = new Label() { Text = "Content1" };
Image img1 = new Image() { ImageUrl = "https://i.imgur.com/C7QdL2K.jpg" };
pn1.Controls.Add(lbl1);
pn1.Controls.Add(img1);
//other code logic
PlaceHolder1.Controls.Add(pn1);
//other code logic
CSS style:
<style>
.items {
display: block;
float: left;
border: 5px solid #f8ecb1;
margin-left: 5px;
}
</style>
Test Result:

With Regards,
Fei Han