the header is formed by a table and kept at a row with 3 columns to show
it is ok at page load but failed after postback, last column width is changed to 300px as set (I wish to expand the 3rd column to show all buttons at same row)
[white-space:nowrap] seems not worked after postback
HTML source code is same before and after postback
Member
33 Points
160 Posts
table row cannot be kept at a row after postback
Jan 11, 2017 06:16 AM|TW88|LINK
the header is formed by a table and kept at a row with 3 columns to show
it is ok at page load but failed after postback, last column width is changed to 300px as set (I wish to expand the 3rd column to show all buttons at same row)
[white-space:nowrap] seems not worked after postback
HTML source code is same before and after postback
any ideas? thx.
****** VS source code ******************
<table class="header"> <tr class="border_bottom"> <td class="logo" onclick="window.location='home.aspx'; return false;">OSHCIS2</td> <td style="max-width:100px;overflow:hidden;text-overflow:ellipsis;border:1px solid red"><asp:Label ID="LbActivity" runat="server" CssClass="EventLabel"/></td> <td style="text-align:right;white-space:nowrap;width:300px;border:1px solid blue"> <asp:Button ID="BtnUpdateStatus" runat="server" Text="Update Status (Attend/Late)" Width="200px" CssClass="HeaderButton" /> <asp:Button ID="BtnExport" runat="server" Text="Export" Width="80px" CssClass="HeaderButton"/> <asp:Button ID="BtnBack" runat="server" Text="Back" Width="80px" CssClass="HeaderButton"/> <asp:Label ID="LbUserName" runat="server" Text="UserName" CssClass="LoginName"/></td> </tr> </table>
********** HTML source code before / after postback *********************************
<table class="header"> <tr class="border_bottom"> <td class="logo" onclick="window.location='home.aspx'; return false;">OSHCIS2</td> <td style="max-width:100px;overflow:hidden;text-overflow:ellipsis;border:1px solid red"><span id="LbActivity" class="EventLabel">Test Company </span></td> <td style="text-align:right;white-space:nowrap;width:300px;border:1px solid blue"> <input type="submit" name="BtnUpdateStatus" value="Update Status (Attend/Late)" id="BtnUpdateStatus" class="HeaderButton" style="width:200px;" /> <input type="submit" name="BtnExport" value="Export" id="BtnExport" class="HeaderButton" style="width:80px;" /> <input type="submit" name="BtnBack" value="Back" id="BtnBack" class="HeaderButton" style="width:80px;" /> <span id="LbUserName" class="LoginName">Tony WONG</span></td> </tr> </table>
Member
33 Points
160 Posts
Re: table row cannot be kept at a row after postback
Jan 11, 2017 06:29 AM|TW88|LINK
IE failed but Chrome can be kept at a row after postback
Member
33 Points
160 Posts
Re: table row cannot be kept at a row after postback
Jan 11, 2017 06:52 AM|TW88|LINK
the postback is caused by a server side button click
it will take SQL action and javascript popup (response write - alert())
after removing the javascript popup, IE can keep the width and stay at a row
but I really love the javascript popup to show update result to user instead of server side
any ideas? thx.
All-Star
15186 Points
3888 Posts
Re: table row cannot be kept at a row after postback
Jan 11, 2017 07:12 AM|raju dasa|LINK
Hi,
Try using Update Panel to do a partial-postback instead of full postback.
or
Try using Asp.net Ajax Page Methods:
http://aspalliance.com/1922_PageMethods_In_ASPNET_AJAX.2
rajudasa.blogspot.com || rajudasa-tech
Member
33 Points
160 Posts
Re: table row cannot be kept at a row after postback
Jan 11, 2017 09:30 AM|TW88|LINK
is it a bug of IE? Thx
All-Star
15186 Points
3888 Posts
Re: table row cannot be kept at a row after postback
Jan 11, 2017 09:51 AM|raju dasa|LINK
Hi,
Check the same case here:
http://stackoverflow.com/questions/8526616/internet-explorer-css-styles-break-after-postback-from-referring-php-page
rajudasa.blogspot.com || rajudasa-tech
Member
33 Points
160 Posts
Re: table row cannot be kept at a row after postback
Jan 12, 2017 02:35 AM|TW88|LINK
Thanks a lot.
exact problem.
Hope IE can fix it later