I'm trying to fit a GridView (or a ListView, I've tried both) into the panel-body of a div panel. However, whenever the GridView appears, it closes out the panel-body early and causes formatting issues.
I've tried GridView, ListView, rearranging the elements of my panel, and I've trimmed a lot of stuff back to get it down to just the GridView.
<asp:ListView ID="lvOuter" runat="server" ItemPlaceholderID="placeHolder" DataKeyNames="PkUser" OnItemCommand="lvOuter_ItemCommand" OnSorting="lvOuter_Sorting" OnSelectedIndexChanging="lvOuter_SelectedIndexChanging" OnPagePropertiesChanging="lvOuter_PagePropertiesChanging">
<LayoutTemplate>
<table style="border-collapse: collapse; width: 100%">
<tbody>
<tr id="placeHolder" runat="server" style="width: 100%"></tr>
</tbody>
<tfoot>
<tr style="align-content: center;">
<td class="listViewFooterText" style="color: white; text-align: center">
<uc:listviewpager runat="server" id="ucOuterListViewPager" listviewcontrolid="lvOuter" />
</td>
</tr>
</tfoot>
</table>
</LayoutTemplate>
<ItemTemplate>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">
<span class="glyphicon glyphicon-user x1" style="text-align: left;" />
<b>
<asp:Label ID="lbEmployeeTitle" runat="server" Style="font-family: Arial; font-size: 14px;" Text='<%# Eval("EmployeeName") %>'></asp:Label></b>
<asp:Label ID="lbUnapprovedTitle" runat="server" CssClass="badge badge-blue" Text='<%# Eval("TotUnapproved") %>'></asp:Label>
</h3>
</div>
<div class="panel-body">
<asp:GridView ID="gvInner" runat="server" DataSource='<%# Eval("IndividualTracking") %>' AutoGenerateColumns="false" DataKeyNames="PkTrainingRequest" OnRowCommand="gvInner_RowCommand">
<Columns>
<asp:TemplateField ItemStyle-Width="40%" HeaderText="Title">
<ItemTemplate>
<asp:LinkButton ID="kbTitle" runat="server" CssClass="gridViewRowText" CommandName="Populate" ToolTip="Go to Training Request" Text='<%# Eval("Title") %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width="20%" HeaderText="Length">
<ItemTemplate>
<asp:LinkButton ID="kbLength" runat="server" CssClass="gridViewRowText" CommandName="Populate" ToolTip="Go to Training Request" Text='<%#Eval("Length") %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width="30%" HeaderText="Date">
<ItemTemplate>
<asp:LinkButton ID="kbDate" runat="server" CssClass="gridViewRowText" CommandName="Populate" ToolTip="Go to Training Request" Text='<%#Eval("Date") %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width="10%" HeaderText="Approve">
<ItemTemplate>
<asp:Button ID="btnQuickApprove" runat="server" Text="Quick Approve" CssClass="btn btn-success" CommandName="Approve" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
<div class="panel-footer">
<div class="row">
<div class="col-md-2"></div>
<div class="col-md-2">
<asp:Button ID="btnDrillDown" Text='<%#Eval("Subordinates") %>' CommandName="DrillDown" CssClass="btn btn-primary" runat="server" Visible='<%#Eval("VisibleSubordinates") %>' />
</div>
<div class="col-md-2">
</div>
<div class="col-md-2">
<asp:Button ID="btnViewTraining" Text="View All Training" CommandName="ViewTraining" CssClass="btn btn-primary" runat="server" />
</div>
<div class="col-md-4"></div>
</div>
</div>
</div>
</ItemTemplate>
</asp:ListView>
Expected result: panels, each with a header and footer, and a gridview (when it populates) in the body.
Actual result: the panels work fine until the gridview populates. When that happens, the panel-body ends before the gridview, and the panel-footer attaches to the top of the next panel.
You made a tr the placeHolder. So it generates this, which is incorrect html
<table style="border-collapse: collapse; width: 100%">
<tbody>
<div class="panel panel-default">
xxx
</div>
So if you want to use a correct table, make the LayoutTemplate like this
<asp:ListView ID="lvOuter" runat="server" ItemPlaceholderID="placeHolder">
<LayoutTemplate>
<table style="border-collapse: collapse; width: 100%">
<tbody>
<tr>
<td>
<span id="placeHolder" runat="server"></span>
</td>
</tr>
</tbody>
</table>
</LayoutTemplate>
<ItemTemplate>
<div class="panel panel-default">
</div>
</ItemTemplate>
</asp:ListView>
Which generates
<table>
<tbody>
<tr>
<td>
<div class="panel panel-default">
</div>
<div class="panel panel-default">
</div>
</td>
</tr>
</tbody>
</table>
This still places everything in a single table cell. If you want a cell per ItemTemplate you need to put <tr><td> in it.
Related
I'm building a table using a asp:Repeater that is inside an UpdatePanel. A column of this table contains some buttons. When these buttons get pressed, there is a partial refresh (i think..) of the UpdatePanel.
What is strange is that some OTHER buttons that are outside and at the top of the table inside another UpdatePanel stop working.
They works perfectly if i don't click the buttons in the repeater. Otherwise they seem to not respond to click event anymore.
A clarification: The refresh button keep working. But even the simple checkbox does not work anymore.
Here is the code:
<div id="containerNotificationCenterDx">
<!-- Contains the five buttons that stop working -->
<div id="containerNotificationFilter">
<asp:UpdatePanel runat="server" ID="UpPnlBAction" UpdateMode="Conditional" ClientIDMode="static">
<ContentTemplate>
<div class="col11" style="padding-left: 10px">
<asp:CheckBox ID="cbSelectAllNotify" runat="server" CssClass="clickableRight" OnCheckedChanged="SelectAllNotify_CheckedChanged"
AutoPostBack="true" />
<asp:LinkButton runat="server" ID="IndexImgRefreshCM" OnClick="IndexImgRefreshCM_OnClick" CssClass="clickableRight">
<i class="fa fa-refresh"></i> <!-- this always works -->
</asp:LinkButton>
<asp:LinkButton runat="server" ID="IndexImgAddFilterCM" OnClientClick="return ajaxModalPopupAddFilterNotificationCenter();" CssClass="clickableRight">
<span id="spanAddFilter">
<i class="fa fa-filter"></i>
<i class="fa fa-plus"></i>
</span>
</asp:LinkButton>
<asp:LinkButton runat="server" ID="IndexImgRemoveFilterCM" OnClick="IndexImgRemoveFilter_OnClick" Enabled="false" CssClass="clickableRight">
<span id="spanRemoveFilter">
<i class="fa fa-filter"></i>
<i class="fa fa-minus"></i>
</span>
</asp:LinkButton>
<asp:LinkButton runat="server" ID="IndexImgExportCM" OnClientClick="return ajaxModalPopupExportDati();" CssClass="clickableRight">
<i class="fa fa-file-excel-o"></i>
</asp:LinkButton>
<asp:LinkButton runat="server" ID="IndexImgSmistaCM" OnClick="IndexImgSmista_OnClick" CssClass="clickableRight">
<span id="spanSmista">
<i class="fa fa-file-o"></i>
<i class="fa fa-arrow-right"></i>
</span>
</asp:LinkButton>
<asp:LinkButton runat="server" ID="IndexImgDeleteCM" OnClick="IndexImgRemove_OnClick" CssClass="clickableRight">
<i class="fa fa-trash-o"></i>
</asp:LinkButton>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<!-- Main notifications container -->
<div id="containerListNotify" style="padding-left: 5px;">
<asp:UpdatePanel ID="UpdatePanelRepListNotify" runat="server" UpdateMode="Conditional" ClientIDMode="Static">
<ContentTemplate>
<!-- DEFINISCE LA STRUTTURA DELLE NOTIFICHE -->
<asp:Repeater ID="repListNotify" runat="server" OnItemCommand="RepListNotify_ItemCommand"
OnItemDataBound="RepListNotify_ItemCreated">
<HeaderTemplate>
<table id="tableCentroMessaggi" class="table table-hover">
<thead>
<tr id="HeaderMessaggi">
<th>
<asp:Label runat="server" ID="docFascCol" Text='<%#this.getDocFascColText() %>' />
</th>
<th>
<asp:Label runat="server" ID="dataCol" Text='<%#this.getDataColText() %>' />
</th>
<th>
<asp:Label runat="server" ID="eventCol" Text='<%#this.getEventColText() %>' />
</th>
<th>
<asp:Label runat="server" ID="fromCol" Text='<%#this.getSenderColText() %>' />
</th>
<th>
<asp:Label runat="server" ID="objDescCol" Text='<%#this.getObjDescColText() %>' />
</th>
<th>
<asp:Label runat="server" ID="tipologyCol" Text='<%#this.getTipologyColText() %>' />
</th>
<th>
<asp:Label runat="server" ID="senderCol" Text='<%#this.getEmailColText() %>' />
</th>
<th>
<asp:Label runat="server" ID="noteCol" Text='<%#this.getNoteColText() %>' />
</th>
<th>
<asp:Label runat="server" ID="actionsCol" Text='<%#this.getActionsColText() %>' />
</th>
</tr>
</thead>
<tbody>
</HeaderTemplate>
<ItemTemplate>
<tr id="messageRow" runat="server">
<td id="messageDetails">
<div>
<!-- checkbox rimozione notifica -->
<asp:CheckBox ID="IndexChkRemoveNotify" CssClass="clickableLeftN" runat="server" />
<!-- icona dettagli documento/fascicolo -->
<asp:LinkButton runat="server" ID="IndexImgDetailsDocument" CommandName="ViewDetailsDocument" CssClass="clickableRight">
</asp:LinkButton>
<!-- id -->
<br />
<div class="notifyField">
<span class="noLink">
<asp:LinkButton ID="lblNotifyLink" runat="server" Text='<%#this.getLabelFieldLink((NttDataWA.DocsPaWR.Notification) Container.DataItem) %>' CommandName="viewLinkObject" OnClientClick="disallowOpHome('Content2');">
</asp:LinkButton>
</span>
</div>
</div>
</td>
<td id="date">
<asp:Label ID="IndexLblDate" runat="server" Text='<%# Bind("DTA_EVENT") %>'></asp:Label>
</td>
<td id="mexEvent">
<asp:Label ID="Label2" runat="server" Text='<%# GetEvent((NttDataWA.DocsPaWR.Notification) Container.DataItem) %>'></asp:Label>
</td>
<td id="mexSender">
<asp:Label ID="Label3" runat="server" Text='<%# GetSource((NttDataWA.DocsPaWR.Notification) Container.DataItem) %>'></asp:Label>
</td>
<td id="objDescription">
<asp:Label ID="Label4" runat="server" Text='<%# GetObjDesc((NttDataWA.DocsPaWR.Notification) Container.DataItem) %>'></asp:Label>
</td>
<td id="tipology">
<asp:Label ID="Label5" runat="server" Text='<%# GetData((NttDataWA.DocsPaWR.Notification) Container.DataItem, Column.Tipology) %>'></asp:Label>
</td>
<td id="mittente">
<asp:Label ID="Label7" runat="server" Text='<%# GetData((NttDataWA.DocsPaWR.Notification) Container.DataItem, Column.Sender) %>'></asp:Label>
</td>
<td id="note">
<div id="containerNoteNotify" runat="server">
<div class="fieldNotesHome">
<div class="fieldNotesHomeBt">
<div class="weight">
<asp:Label ID="lblNotes" Text='<%$ localizeByText:IndexLblNotes%>' runat="server"
Visible="false"></asp:Label>
</div>
<div style="padding-top: 30px; padding-left: 55px;">
<cc1:CustomTextArea ID="txtNoteNotify" runat="server" TextMode="MultiLine" ClientIDMode="Static"
CssClass="homeNotes">
</cc1:CustomTextArea>
</div>
<div style="text-align: right;">
<asp:Button ID="litSaveNotes" Text='<%$ localizeByText:IndexLitSaveNotes%>' CommandName="SaveNotesNotify"
runat="server" CssClass="buttonNotes" ImageAlign="Right"></asp:Button>
<asp:Button ID="litRemoveNotes" Text='<%$ localizeByText:IndexLitRemoveNotes%>' CommandName="RemoveNotesNotify"
runat="server" CssClass="buttonNotes" ImageAlign="Right"></asp:Button>
</div>
</div>
</div>
</div>
</td>
<!-- these buttons generate the issue -->
<td id="actionsButtons">
<div id="actionsButtonsContainer">
<asp:LinkButton runat="server" ID="btnTypeDocCM" CommandName="ViewDocument" CssClass="clickableLeft"
ToolTip='<%$ localizeByText:IndexBtnTypeDocTooltip%>'>
<i class="fa fa-search"></i>
</asp:LinkButton>
<asp:LinkButton runat="server" ID="btnSignatureDetails" CommandName="SignatureDetails" CssClass="clickable"
ToolTip='<%$ localizeByText:DocumentSignatureDetails%>' Visible="false">
<i class="dettaglioFirma"></i>
</asp:LinkButton>
<asp:LinkButton runat="server" ID="IndexImgAdd" CommandName="AddNote" CssClass="clickableLeft"
Visible='<%#GetEnableNote() %>'>
<span class="fa-stack">
<i class="fa fa-file-o fa-stack-2x"></i>
<i class="fa fa-plus fa-stack-1x"></i>
</span>
</asp:LinkButton>
<asp:LinkButton runat="server" ID="IndexImgRemoveNotify" CommandName="RemoveNotify" CssClass="clickableRight">
<i class="fa fa-trash-o"></i>
</asp:LinkButton>
</div>
</td>
</tr>
<asp:HiddenField runat="server" ID="NotifyId" Value='<%# Bind("ID_NOTIFY") %>' />
</ItemTemplate>
<FooterTemplate>
</tbody>
</table>
</FooterTemplate>
</asp:Repeater>
<asp:HiddenField ID="grid_rowindex" runat="server" ClientIDMode="Static" />
<asp:HiddenField ID="HiddenRemoveNotifications" runat="server" ClientIDMode="Static" />
<asp:HiddenField ID="HiddenRemoveNotification" runat="server" ClientIDMode="Static" />
</ContentTemplate>
</asp:UpdatePanel>
</div>
<asp:HiddenField ID="grid_pageindex" runat="server" ClientIDMode="Static" />
<asp:UpdatePanel ID="upPnlGridIndexes" runat="server" ClientIDMode="Static" UpdateMode="Conditional">
<ContentTemplate>
<div id="navHome">
<asp:PlaceHolder ID="plcNavigator" runat="server" />
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
I don't get any error.
Update: All the controls in the "UpPnlBAction" UpdatePanel don't work.
Try to add in update panel ChildrenAsTriggers ="false" then see
https://msdn.microsoft.com/en-us/library/system.web.ui.updatepanel.childrenastriggers(v=vs.110).aspx
Check if this solves your problem or not
I'm working on shopping cart application where I have listed all the products in a ListView. Then on button click of each product the image slider changes. Now I want to make it on mouseover instead of click. Below is the code I have tried to achieve.
ASP
<div class="col-md-12 ">
<div class="col-md-4 single_left pull-left">
<div class="flexslider">
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Repeater runat="server" ID="Repeater">
<HeaderTemplate>
<ul class="slides">
</HeaderTemplate>
<ItemTemplate>
<li data-thumb='<%# "assets/products/"+DataBinder.Eval(Container.DataItem, "Image1") %>'>
<asp:Image ID="image5" runat="server"
ImageUrl='<%# "assets/products/"+DataBinder.Eval(Container.DataItem, "Image1") %>' />
</li>
</ItemTemplate>
<FooterTemplate>
</ul>
</FooterTemplate>
</asp:Repeater>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<script defer src="assets/js/jquery.flexslider.js"></script>
<link rel="stylesheet" href="assets/css/flexslider.css" type="text/css" media="screen" />
<!-- FlexSlider -->
<div class="caption">
<strong>
<asp:Label ID="lblPrice" runat="server" Text="*"></asp:Label></strong>
<strong>
<asp:Label ID="ItemCode" runat="server" Text="*"></asp:Label></strong>
<p>
<small><strong>
<asp:Label ID="lblDesc" runat="server" Text="*"></asp:Label>
</strong></small>
<br />
<asp:Label ID="lblID" Style="display: none;" runat="server" Text='<%# Eval("ID") %>'></asp:Label>
<small>
<asp:Label ID="lblMsg" runat="server" Text="*" ForeColor="#990000"></asp:Label>
</small>
<br />
</p>
<asp:TextBox ID="txtqty" type="number" class="form-control" Text="0" runat="server"></asp:TextBox>
</div>
<asp:LinkButton ID="btnSubmit" type="submit" CssClass="add-cart item_add" runat="server" OnClick="btnSubmit_Click"><i class="fa fa-save"></i> Add to Cart</asp:LinkButton>
<script>
// Can also be used with $(document).ready()
$(window).load(function () {
$('.flexslider').flexslider({
animation: "slide",
controlNav: "thumbnails"
});
});
</script>
</div>
<div class="col-md-8 single-top-in simpleCart_shelfItem">
<asp:ListView ID="ImagesList" runat="server"
DataKeyNames="ID"
GroupItemCount="15"
OnPagePropertiesChanging="ImagesList_PagePropertiesChanging" OnSelectedIndexChanged="OnSelectedIndexChanged">
<EmptyDataTemplate>
No Images found.
</EmptyDataTemplate>
<LayoutTemplate>
<table>
<tr runat="server" id="groupPlaceholder" />
</table>
</LayoutTemplate>
<GroupTemplate>
<tr>
<td runat="server" id="itemPlaceholder" />
</tr>
</GroupTemplate>
<ItemTemplate>
<td>
<asp:LinkButton ID="LBtn" runat="server"
CommandName="Change"
OnCommand="btnDetails_Command"
CommandArgument='<%# Eval("Notes") %>'>
<img src='<%#"assets/products/"+Eval("ImageUrl").ToString() %>' class="image" style="Width:50px;Height:50px" alt="Change" onmouseover="this.OnCommand" />
</asp:LinkButton>
</td>
</ItemTemplate>
</asp:ListView>
</div>
<div class="clearfix"></div>
<!---->
</div>
I must say that your approach of mouseovering which triggers click - seems not as the right solution. ( Just saying)
Anyway - Change your code to :
<asp:LinkButton ... CssClass="myButton"
...
</asp:LinkButton>
Then , via jQuery (which you already use) :
$(function (){
$(".myButton").on('mouseover',function (){this.click()});
});
I'm having a problem with IE. The page works fine in all browsers like shown below.
but in IE the data doesn't show up even though its there.
The problem is caused by the overflow:hidden attribute I use on the item template of the ListView. When I change it to any other value the data shows up in IE but of course the layout gets messed up in all browsers.
Here is the source code and the CSS http://jsfiddle.net/V5aCa/8/
And here is my code:
<asp:ListView ID="BookListView" runat="server" DataSourceID="SqlDataSource1"
onselectedindexchanged="BookListView_SelectedIndexChanged">
<LayoutTemplate>
<table runat="server" cellpadding="1" id="tblBooks" style="">
<tr runat="server">
<td runat="server">
<table ID="itemPlaceholderContainer" runat="server" border="0" style="">
<tr ID="itemPlaceholder" runat="server">
</tr>
</table>
</td>
</tr>
</table>
</LayoutTemplate>
<ItemTemplate>
<div style="overflow:hidden">
<div class="itemTemplateleftColumn">
<asp:Image ID="Image1" runat="server" ImageUrl='<%# String.Format("~\\Static\\Images\\BookCovers\\{0}", Eval("CoverImageSmall")) %>' Height="120px" Width="90px" BorderColor="Gray" BorderWidth="1px"/>
</div>
<div class="itemTemplaterightColumn">
<div class="titleRow">
<asp:Label runat="server" ID="BookTitleLabel" Text='<%# Eval("Title") %>' />
</div>
<div class="nameRow">
<asp:Label runat="server" ID="FirstNameLabel" Text='<%# Eval("FirstName") %>' />
<asp:Label runat="server" ID="LastNameLabel" Text='<%# Eval("LastName") %>' />
</div>
<div class="values">
<div>
value1
</div>
<div>
value2
</div>
</div>
<div class="values">
<div>
value3
</div>
<div>
<asp:Label runat="server" ID="PriceLabel" Text='<%# Eval("Price") %>' />€
</div>
</div>
</div>
</div>
</ItemTemplate>
</asp:ListView>
</asp:Content>
I would appreciate any help on solving this issue. Thanks in advance.
Apply minimum Height and Width for that div in Gridview and then apply overflow
min-height: 110px;min-width: 150px;
Try this hope it will help!
[Updated] First, apply a css class or id to avoid inline styling.
Then, try to write overflow:hidden !important to prevent IE from applying that rule, this should do the trick!
.your-div-class{
overflow:visible; /* This is default value, but reset it anyway */
overflow:hidden !important;
}
I have a one dropdown box in webpage that is with autopostback = true and one modal popup extender in same webp age.. When i changed the selection and then open modal popup and enter value then close the modal popup.. It will postback and entered value does not display when open modal popup again....How i prevent postback when close modalpopup and getting same value again...
Please help for the same...My code is given below:
<asp:DropDownList runat="server" ID="ddlDBANameFormField" AutoPostBack="true" >
<asp:ListItem Selected="True" Text="Select"></asp:ListItem>
<asp:ListItem Text="One"></asp:ListItem>
<asp:ListItem Text="Two"></asp:ListItem>
<asp:ListItem Text="Three"></asp:ListItem>
</asp:DropDownList>
<div id="tempHotelStatistic">
<div id="MainHotelStatistic" style="width: 998px;" runat="server">
<div style="width: 330px; height: 30px; float: left;" id="RoomsRentedAfterAudit"
runat="server">
<div style="width: 150px; float: left;">
<asp:Label ID="lblRoomsRentedAfterAudit" runat="server" Text="After Audit Rooms:"
Width="175px" CssClass="label"></asp:Label>
</div>
<asp:UpdatePanel UpdateMode="Conditional" runat="server" ID="UpdatePanel3">
<ContentTemplate>
<div style="width: 150px; float: left;">
<table>
<tr>
<td>
<asp:TextBox ID="txtRoomsRentedAfterAudit" runat="server" CssClass="textboxpopup"></asp:TextBox>
<cc1:ModalPopupExtender ID="ModalPopupExtender4" OkControlID="ModalOKButtonRoomsRented"
runat="server" TargetControlID="btnpopupRoomsRented" CancelControlID="btnpopupCancelRoomsRented"
PopupControlID="PanelRoomRented" Drag="true" PopupDragHandleControlID="PopupHeader1" >
</cc1:ModalPopupExtender>
</td>
<td>
<asp:Button ID="btnpopupRoomsRented" runat="server" Text="...." CssClass="buttonpopup"
Style="color: #333333; margin-left: 0; margin-right: 0; width: 35px;" />
</td>
</tr>
</table>
</div>
<div id="PanelRoomRented" style="display: none;" class="popupConfirmation">
<div class="popup_Container">
<div class="popup_Titlebar" id="Div3">
<div class="TitlebarLeft">
Reason :
</div>
<div>
<asp:Button ID="btnpopupCancelRoomsRented" class="TitlebarRight " runat="server" />
</div>
</div>
<div>
<table>
<tr>
<td valign="top" height="5px">
</td>
</tr>
<tr>
<td valign="bottom">
<textarea id="txtRoomsRentedAfterAuditReason" runat="server" rows="20" cols="20"
style="width: 270px; height: 100px;"></textarea>
</td>
</tr>
<tr>
<td valign="top" height="5px">
</td>
</tr>
</table>
</div>
</div>
<div class="popup_Container" align="right">
<asp:Button ID="ModalOKButtonRoomsRented" runat="server" Width="60px" Text="OK" CssClass="buttonForPopUp" />
</div>
</div>
<cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender111" runat="server" FilterType="Custom,Numbers"
ValidChars="-" FilterMode="ValidChars" TargetControlID="txtRoomsRentedAfterAudit">
</cc1:FilteredTextBoxExtender>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="btnpopupRoomsRented" />
</Triggers>
</asp:UpdatePanel>
</div>
</div>
</div>
Solved the problem by applying trigger for the update panel , in which modal popup resides...
<Triggers>
<asp:PostBackTrigger ControlID="ddlDBANameFormField" />
</Triggers>
I've got a problem here with a div not being placed that way I'd like it to.
This is the ASP code I'm using:
<asp:ListView ID="categoriesListView" runat="server">
<LayoutTemplate>
<div class="main" runat="server">
<div ID="itemPlaceholder" class="sub" runat="server">
</div>
</div>
</LayoutTemplate>
<EmptyDataTemplate>
<div class="main" runat="server">
<div class="sub" ID="itemPlaceholder" runat="server">
No data was returned.
</div>
</div>
</EmptyDataTemplate>
<ItemTemplate>
<asp:Image AlternateText='<%# Eval("CategoryName") %>' ID="Image1" runat="server" ImageUrl='<%# Eval("CategoryImgUrl", "~/Images/{0}") %>' />
<asp:Label ID="ProductNameLabel" runat="server" Text='<%# Eval("CategoryName") %>' />
</ItemTemplate>
</asp:ListView>
I was expecting results like this:
<div class="main">
<div class="sub">
...
</div>
<div class="sub">
...
</div>
<div class="sub">
...
</div>
...
</div>
The result was one big div "main" containing everything, with no "sub" divs.
If I added the itemPlaceholder one level deeper, the same thing would happen, now with 1 "sub" div and everything pushed in there. How do I solve this?
Change it to look like this:
<LayoutTemplate>
<div class="main" runat="server">
<div ID="itemPlaceholder" runat="server">
</div>
</div>
</LayoutTemplate>
<EmptyDataTemplate>
<div class="main" runat="server">
<div class="sub" ID="itemPlaceholder" runat="server">
No data was returned.
</div>
</div>
</EmptyDataTemplate>
<ItemTemplate>
<div class="sub" >
<asp:Image AlternateText='<%# Eval("CategoryName") %>' ID="Image1" runat="server" ImageUrl='<%# Eval("CategoryImgUrl", "~/Images/{0}") %>' />
<asp:Label ID="ProductNameLabel" runat="server" Text='<%# Eval("CategoryName") %>' />
</div>
</ItemTemplate>