When I deploy an ASPX page with markup alone it creates duplicate Content Editors.
It's a SharePoint 2013 site, and the controls have no javascript or text attached. They're simply created in markup. Upon deployment, a new Content Editor is generated in addition to the old ones. Do I have to uniquely identify the controls beyond an id somehow to prevent this behavior? I'm working on a very old site I inherited, so maybe there's something improperly configured somewhere?
<asp:Content ContentPlaceHolderID="PlaceHolderMain" runat="server">
<div class="main-pages-content">
<div id="mainTabstrip" class="mt-4" style="width: 100%;">
<ul>
<li class="k-state-active">Current Announcements</li>
<li>FAQ</li>
<li>Research FAQ</li>
</ul>
<div class="row">
<div class="col-10">
<WebPartPages:WebPartZone runat="server" Title="loc:Blog" ID="webPartZoneCurrentAnnouncements" FrameType="TitleBarOnly">
<zonetemplate></zonetemplate>
</WebPartPages:WebPartZone>
</div>
</div>
<div class="row">
<div class="col-10">
<WebPartPages:WebPartZone runat="server" Title="loc:FAQ" ID="webPartZonzeFAQ" FrameType="TitleBarOnly">
<zonetemplate>
<WebPartPages:ContentEditorWebPart runat="server" WebPart="true" Title="FAQ Content Editor" ID="contentEditorFAQ" FrameType="None">
</WebPartPages:ContentEditorWebPart>
</zonetemplate>
</WebPartPages:WebPartZone>
</div>
</div>
<div class="row">
<div class="col-10">
<WebPartPages:WebPartZone runat="server" Title="loc:ResearchFAQ" ID="webPartZoneResearchFAQ" FrameType="TitleBarOnly">
<zonetemplate>
<WebPartPages:ContentEditorWebPart runat="server" WebPart="true" Title="Research FAQ Content Editor" ID="contentEditorResearchFAQ" FrameType="None">
</WebPartPages:ContentEditorWebPart>
</zonetemplate>
</WebPartPages:WebPartZone>
</div>
</div>
<SharePoint:ScriptBlock runat="server">if(typeof(MSOLayout_MakeInvisibleIfEmpty) == "function") {MSOLayout_MakeInvisibleIfEmpty();}</SharePoint:ScriptBlock>
</div>
</div>
</asp:Content>
Related
In older asp.net pages you could tell the DataList to fill horizontally like this :
<asp:DataList ID="dl" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow" RepeatColumns="2">
Starting from a Razor Page vertical fill :
#foreach (var x in Model.records)
{
<tr class="border text-center">
<td>#x.AccessDate</td>
<td>#x.AccessLocationName</td>
<td>
<img src="#x.imagepath" class="grow" />
</td>
</tr>
}
Is it possible to get a horizontal layout that is 2 wide before it starts next row, with a Razor page ?
Found a solution that works for my project in this thread :Display three columns per row in MVC cshtml
Letting Bootstrap automatically wrap the columns is working so far. As I wanted two records per row, I went with something similar to this :
<div class="row">
#foreach (var x in Model.scanrecords)
{
<div id="dataListItem" class="col-md-6 border border-dark rounded mx-auto">
<div class="">
<img src="#x.imagepath" class="grow" />
</div>
<div class="row">
<div class="col-md-12">
<label>Access Date: #x.AccessDate</label>
</div>
</div>
</div><!-- end col-md-6 -->
}
</div>
I am trying to align asp.net text boxes to the asp.net RadioButtonList specific list items using bootstrap 3. I have tried Align textbox to right of radiobuttonlist listitem using that and achieved this
but, I am getting text boxes very far from the RadioButtonList instead of side by side close to the radio button list items. Experts, please help me where I am going wrong.
Here is my code so far,
<div class="col-xs-12">
<asp:Label ID="Label1" runat="server" CssClass="forQuestions">What language do you feel MOST comfortable speaking?</asp:Label>
<div class="form-group col-xs-12">
<div class="radio radiobuttonlist col-xs-6">
<asp:RadioButtonList ID="RadioButtonList2" runat="server" CssClass="forOptions">
<asp:ListItem>English is my first language</asp:ListItem>
<asp:ListItem>French is my first language</asp:ListItem>
<asp:ListItem>I am comfortable with both English and Frech</asp:ListItem>
<asp:ListItem>I am comfortable with both English and Another Language, please specify</asp:ListItem>
<asp:ListItem>Other, please specify</asp:ListItem>
</asp:RadioButtonList>
</div>
<div class="col-xs-12 col-xs-6">
</div>
<div class="col-xs-12 col-xs-6">
</div>
<div class="col-xs-6 col-xs-3">
<asp:TextBox ID="TextBox3" runat="server" MaxLength="499" Text="choice4" Visible="true" Width="400" class="form-control input-xs">
</asp:TextBox>
</div>
<div class="col-xs-12 col-xs-6">
<asp:TextBox ID="TextBox4" runat="server" MaxLength="499" Text="choice5" Visible="true" Width="400" class="form-control input-xs">
</asp:TextBox>
</div>
</div>
</div>
I'm trying to get the dropzonejs script to work in a asp.net site with master page and child webforms. I got a good idea how to from this question but that works on a simple webform..how do I get it to work on an aspx page that has a master page?
So my masterpage right now has this:
<body class="fixed-top">
<form id="form1" runat="server" autocomplete="off" class="dropzone">
<div id="container">
<div id="body">
<div class="container-fluid">
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server"></asp:ContentPlaceHolder>
</div>
</div>
</div>
</form>
</body>
and in my aspx page I have this:
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<h3 class="page-title">Filemanager</h3>
<div class="box"> <!--INSIDE THIS IS WHERE I WOULD WANT DROPZONE TO LOAD-->
<div>
<div class="fallback">
<input name="file" type="file" multiple />
</div>
</div>
</div>
</asp:Content>
the problem is that it loads but outside the containers..any ideas?
I was able to make it work in a Master/Child page scenario.
Since I am using a div element instead of the form element in the child page, I need to assign the url as an option. (see script block below)
Make sure give your form element the class="dropzone", it is missing in your code.
<script type="text/javascript">
Dropzone.options.myAwesomeDropzone = {
paramName: "file", // The name that will be used to transfer the file
maxFilesize: 2, // MB
url: "/user/tasks/photoupload.aspx?tid=<%=Request.QueryString["tid"]%>"
};
</script>
<div id="my-awesome-dropzone" class="dropzone">
<div class="fallback">
<input name="file" type="file" multiple="multiple" runat="server"/>
<input name="btnUpload" type="submit" /><br /><br />
<asp:Label id="lblFallbackMessage" runat="server" />
</div>
</div>
Good luck.
I have a navigationbar that's controled completly by css ul and li.
The first unordered list contains listitems which are always displayed (General Site pages).
on hovering over the listitem (Gamma), the sublistitems appear. These sublistitems are themself in an unordered list of car models with the modelname. Hovering one of these items show me a picture of the car in a seperate div.
When I create the list of cars manually all works fine. The car models en their image are shown correctly.
When I create the unordered list dynamically by a listview. The car names are not shown.
If I place the listview out of the navigation ul. The listview works correct.
I assume it has something to do with the moment that the listview creates the unordered list. Can anyone point me in the right direction?
My ASP.net code
<nav>
<ul class="menu">
<li><a class="active" href="Default.aspx">H</a></li>
<li>Gamma
**<asp:ListView ID="lvGamma" runat="server">
<LayoutTemplate>
<ul>
<asp:PlaceHolder ID="itemPlaceholder" runat="server"></asp:PlaceHolder>
</ul>
</LayoutTemplate>
<ItemTemplate>
<li><a href='<%# "AixamGamma.aspx?Model=" + Eval("car.NewCarID").ToString %>' class="sublistitem" >
<asp:Label ID="lblModelName" runat="server" Text='<%# Eval("car.ModelName") %>'></asp:Label></a>
<div class="modeldetail">
<div class="redbox">
<div class="whitebox">
<div class="container_12">
<div class="wrapper">
<div class="grid_5">
<h3>
<asp:Label ID="lblModelSlogan" runat="server" Text='<%# Eval("car.Slogan") %>'></asp:Label>
</h3>
</div>
<div class="grid_3">
<div class="wrapper">
<img src='<%# Eval("image.ImageLocationPath") + Eval("image.ImageFileName")%>' alt='<%# Eval("car.ModelName") %>'
class="img-max-h200-w200" />
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</li>
</ItemTemplate>
</asp:ListView>**
*<ul>
<li>City</li>
<li>CityS</li>
<li>Crossline</li>
<li>GTO
<div class="modeldetail">
<div class="redbox">
<div class="whitebox">
<div class="container_12">
<div class="wrapper">
<div class="grid_5">
<h2>
De nieuwe Aixam Gto</h2>
<p>
Rijden zonder rijbewijs in een sportief kleedje</p>
</div>
<!--- image width max 220px --->
<div class="grid_3">
<div class="wrapper">
<img src="images/Sliders/Aixam%20GTO.jpg" alt="Gto" />
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</li>
<li>Crossover</li>
</ul>*
</li>
<li>Tweedehands</li>
<li>Onderhoud/herstelling </li>
<li>Wetgeving</li>
<li>Contact</li>
</ul>
</nav>
the bold part doesn't work except when its placed out the navigation list, the italic part does
thx for the help
I got it working. I've tested the code with the hard coded unordered list AND the listview together in one item. Removing the hard coded list did the trick....
I have a couple divs and they are set up to be sepereate. but when I load the page they all go underneath the first div that is created. So the example below SiteFullControl is the first div, everything just falls underneath here when the page load. any ideas?
<div id="SiteFullControl" >
<fullcontrol:FullAlbum runat="server" ID="FullControlAlbum" />
</div>
<div id="SitePartialControl" >
<partialalbum:partialalbum ID="partialcontrolalbums" runat="server" />
</div>
<div id="SiteViewOnlyAlbums" class="">
<viewonly:viewonly ID="viewonlyalbums" runat="server" />
</div>
<div id="SitePublicAlbums" class="">
<publicalbum:publicalbum ID="publicalbum" runat="server" />
</div>
<div id="SiteFavoriteAlbums" class="">
<favoritealbum:favoritealbum ID="favoritealbum" runat="server" />
</div>
<div id="SiteFriends" class="">
<friends:friends ID="friend" runat="server" />
</div>
<div id="SiteCreateAlbum" class="">
<createalbum:createalbum ID="createalbums" runat="server" />
</div>
Example of whats happen when the page load
<div id="SiteFullControl" >
<fullcontrol:FullAlbum runat="server" ID="FullControlAlbum" />
I checked the css with firebug and it does not have any position for the css.
use this CSS rule, it may work:
display:block;
no more help can be given without accessing CSS properties.