Adrian Cross
asked on
Change div sizes at runtime.
Hello,
I'm trying to change the height and width of some divs, at runtime, but I haven't had much luck so far.
this my source code
I've tried
The code above won't change anything. I'm wondering if it is an updatepanel issue???
Thanks!
I'm trying to change the height and width of some divs, at runtime, but I haven't had much luck so far.
this my source code
<div id="divImgContainer" style="height: auto; width: 1000px; overflow-y: scroll; display: inline" runat="server">
<div id="divImg" style="height: 900px; width: 640px; overflow: auto; float: left;" runat="server">
<asp:UpdatePanel runat="server" ChildrenAsTriggers="False" UpdateMode="Conditional" ID="upnlMainImage">
<ContentTemplate>
<asp:Image runat="server" ID="img"
ImageUrl=""
Height="900px" Width="640px" BorderStyle="Solid" BorderWidth="2px" BorderColor="Red"></asp:Image>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div id="divResult" style="float: left;" runat="server">
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="upnlTicks" ChildrenAsTriggers="False">
<ContentTemplate>
<asp:Panel ID="pnlResult" runat="server" Height="900px" GroupingText="Mark Here" Width="320px">
<asp:Label ID="lblResults" runat="server" Text=""></asp:Label>
<asp:Repeater ID="rptResults" runat="server" OnItemCommand="rptResults_ItemCommand" OnItemDataBound="rptResults_ItemDataBound">
<ItemTemplate>
<table class="nozoom" id="tblzoom" runat="server">
<tr>
<td>
I've tried
divImgContainer.Style.Add("height", "1200px");
Img.Style.Add("height", "1200px");
divResult.Style.Add("Height","1200px");
and using attributes
divImgContainer.Attributes.Add("style", "height: 1200px;");
The code above won't change anything. I'm wondering if it is an updatepanel issue???
Thanks!
can you provide generated HTML and the aspx source code?
ASKER
Question edited.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks, that did the trick!
coool, then you may proceed to close this question cheers
as proposed