Sharepoint 2010 Blue Ribbon Tag - sharepoint-2010

I've created new master page in Sharepoint 2010 and mistakenly I missed Blue Ribbon. I've tried various ways to get back that blue-ribbon, can someone give me exact and only code sample of blue-ribbon for Sharepoint 2010.
I copy / past following code from v4.master but still not working:
<div id="s4-ribbonrow" class="s4-pr s4-ribbonrowhidetitle">
<div id="s4-ribboncont">
<SharePoint:SPRibbon
runat="server"
PlaceholderElementId="RibbonContainer"
CssFile="">
<SharePoint:SPRibbonPeripheralContent
runat="server"
Location="TabRowLeft"
CssClass="ms-siteactionscontainer s4-notdlg">
<span class="ms-siteactionsmenu" id="siteactiontd">
<SharePoint:SiteActions runat="server" accesskey="<%$Resources:wss,tb_SiteActions_AK%>" id="SiteActionsMenuMain"
PrefixHtml=""
SuffixHtml=""
MenuNotVisibleHtml="&nbsp;"
>
<CustomTemplate>
<SharePoint:FeatureMenuTemplate runat="server"
FeatureScope="Site"
Location="Microsoft.SharePoint.StandardMenu"
GroupId="SiteActions"
UseShortId="true"
>
<SharePoint:MenuItemTemplate runat="server" id="MenuItem_EditPage"
Text="<%$Resources:wss,siteactions_editpage%>"
Description="<%$Resources:wss,siteactions_editpagedescriptionv4%>"
ImageUrl="/_layouts/images/ActionsEditPage.png"
MenuGroupId="100"
Sequence="110"
ClientOnClickNavigateUrl="javascript:ChangeLayoutMode(false);"
/>
<SharePoint:MenuItemTemplate runat="server" id="MenuItem_TakeOffline"
Text="<%$Resources:wss,siteactions_takeoffline%>"
Description="<%$Resources:wss,siteactions_takeofflinedescription%>"
ImageUrl="/_layouts/images/connecttospworkspace32.png"
MenuGroupId="100"
Sequence="120"
/>
<SharePoint:MenuItemTemplate runat="server" id="MenuItem_CreatePage"
Text="<%$Resources:wss,siteactions_createpage%>"
Description="<%$Resources:wss,siteactions_createpagedesc%>"
ImageUrl="/_layouts/images/NewContentPageHH.png"
MenuGroupId="200"
Sequence="210"
UseShortId="true"
ClientOnClickScriptContainingPrefixedUrl="if (LaunchCreateHandler('Page')) { OpenCreateWebPageDialog('~site/_layouts/createwebpage.aspx') }"
PermissionsString="AddListItems, EditListItems"
PermissionMode="All" />
<SharePoint:MenuItemTemplate runat="server" id="MenuItem_CreateDocLib"
Text="<%$Resources:wss,siteactions_createdoclib%>"
Description="<%$Resources:wss,siteactions_createdoclibdesc%>"
ImageUrl="/_layouts/images/NewDocLibHH.png"
MenuGroupId="200"
Sequence="220"
UseShortId="true"
ClientOnClickScriptContainingPrefixedUrl="if (LaunchCreateHandler('DocLib')) { GoToPage('~site/_layouts/new.aspx?FeatureId={00bfea71-e717-4e80-aa17-d0c71b360101}&ListTemplate=101') }"
PermissionsString="ManageLists"
PermissionMode="Any"
VisibilityFeatureId="00BFEA71-E717-4E80-AA17-D0C71B360101" />
<SharePoint:MenuItemTemplate runat="server" id="MenuItem_CreateSite"
Text="<%$Resources:wss,siteactions_createsite%>"
Description="<%$Resources:wss,siteactions_createsitedesc%>"
ImageUrl="/_layouts/images/newweb32.png"
MenuGroupId="200"
Sequence="230"
UseShortId="true"
ClientOnClickScriptContainingPrefixedUrl="if (LaunchCreateHandler('Site')) { STSNavigate('~site/_layouts/newsbweb.aspx') }"
PermissionsString="ManageSubwebs,ViewFormPages"
PermissionMode="All" />
<SharePoint:MenuItemTemplate runat="server" id="MenuItem_Create"
Text="<%$Resources:wss,siteactions_create%>"
Description="<%$Resources:wss,siteactions_createdesc%>"
MenuGroupId="200"
Sequence="240"
UseShortId="true"
ClientOnClickScriptContainingPrefixedUrl="if (LaunchCreateHandler('All')) { STSNavigate('~site/_layouts/create.aspx') }"
PermissionsString="ManageLists, ManageSubwebs"
PermissionMode="Any" />
<SharePoint:MenuItemTemplate runat="server" id="MenuItem_ViewAllSiteContents"
Text="<%$Resources:wss,quiklnch_allcontent%>"
Description="<%$Resources:wss,siteactions_allcontentdescription%>"
ImageUrl="/_layouts/images/allcontent32.png"
MenuGroupId="300"
Sequence="302"
UseShortId="true"
ClientOnClickNavigateUrl="~site/_layouts/viewlsts.aspx"
PermissionsString="ViewFormPages"
PermissionMode="Any" />
<SharePoint:MenuItemTemplate runat="server" id="MenuItem_EditSite"
Text="<%$Resources:wss,siteactions_editsite%>"
Description="<%$Resources:wss,siteactions_editsitedescription%>"
ImageUrl="/_layouts/images/SharePointDesigner32.png"
MenuGroupId="300"
Sequence="304"
UseShortId="true"
ClientOnClickScriptContainingPrefixedUrl="EditInSPD('~site/',true);"
PermissionsString="AddAndCustomizePages"
PermissionMode="Any"
/>
<SharePoint:MenuItemTemplate runat="server" id="MenuItem_SitePermissions"
Text="<%$Resources:wss,people_sitepermissions%>"
Description="<%$Resources:wss,siteactions_sitepermissiondescriptionv4%>"
ImageUrl="/_layouts/images/Permissions32.png"
MenuGroupId="300"
Sequence="310"
UseShortId="true"
ClientOnClickNavigateUrl="~site/_layouts/user.aspx"
PermissionsString="EnumeratePermissions"
PermissionMode="Any" />
<SharePoint:MenuItemTemplate runat="server" id="MenuItem_Settings"
Text="<%$Resources:wss,settings_pagetitle%>"
Description="<%$Resources:wss,siteactions_sitesettingsdescriptionv4%>"
ImageUrl="/_layouts/images/settingsIcon.png"
MenuGroupId="300"
Sequence="320"
UseShortId="true"
ClientOnClickNavigateUrl="~site/_layouts/settings.aspx"
PermissionsString="EnumeratePermissions,ManageWeb,ManageSubwebs,AddAndCustomizePages,ApplyThemeAndBorder,ManageAlerts,ManageLists,ViewUsageData"
PermissionMode="Any" />
<SharePoint:MenuItemTemplate runat="server" id="MenuItem_CommitNewUI"
Text="<%$Resources:wss,siteactions_commitnewui%>"
Description="<%$Resources:wss,siteactions_commitnewuidescription%>"
ImageUrl="/_layouts/images/visualupgradehh.png"
MenuGroupId="300"
Sequence="330"
UseShortId="true"
ClientOnClickScriptContainingPrefixedUrl="GoToPage('~site/_layouts/prjsetng.aspx')"
PermissionsString="ManageWeb"
PermissionMode="Any"
ShowOnlyIfUIVersionConfigurationEnabled="true" />
</SharePoint:FeatureMenuTemplate>
</CustomTemplate>
</SharePoint:SiteActions></span>
<asp:ContentPlaceHolder id="PlaceHolderGlobalNavigation" runat="server">
<SharePoint:PopoutMenu
runat="server"
ID="GlobalBreadCrumbNavPopout"
IconUrl="/_layouts/images/fgimg.png"
IconAlt="<%$Resources:wss,master_breadcrumbIconAlt%>"
IconOffsetX=0
IconOffsetY=112
IconWidth=16
IconHeight=16
AnchorCss="s4-breadcrumb-anchor"
AnchorOpenCss="s4-breadcrumb-anchor-open"
MenuCss="s4-breadcrumb-menu">
<div class="s4-breadcrumb-top">
<asp:Label runat="server" CssClass="s4-breadcrumb-header" Text="<%$Resources:wss,master_breadcrumbHeader%>" />
</div>
<asp:ContentPlaceHolder id="PlaceHolderTitleBreadcrumb" runat="server">
<SharePoint:ListSiteMapPath
runat="server"
SiteMapProviders="SPSiteMapProvider,SPContentMapProvider"
RenderCurrentNodeAsLink="false"
PathSeparator=""
CssClass="s4-breadcrumb"
NodeStyle-CssClass="s4-breadcrumbNode"
CurrentNodeStyle-CssClass="s4-breadcrumbCurrentNode"
RootNodeStyle-CssClass="s4-breadcrumbRootNode"
NodeImageOffsetX=0
NodeImageOffsetY=353
NodeImageWidth=16
NodeImageHeight=16
NodeImageUrl="/_layouts/images/fgimg.png"
RTLNodeImageOffsetX=0
RTLNodeImageOffsetY=376
RTLNodeImageWidth=16
RTLNodeImageHeight=16
RTLNodeImageUrl="/_layouts/images/fgimg.png"
HideInteriorRootNodes="true"
SkipLinkText="" />
</asp:ContentPlaceHolder>
</SharePoint:PopoutMenu>
<div class="s4-die">
<asp:ContentPlaceHolder id="PlaceHolderGlobalNavigationSiteMap" runat="server" Visible="false">
</asp:ContentPlaceHolder>
</div>
</asp:ContentPlaceHolder>
<SharePoint:PageStateActionButton id="PageStateActionButton" runat="server" Visible="false" />
</SharePoint:SPRibbonPeripheralContent>
<SharePoint:SPRibbonPeripheralContent
runat="server"
Location="TabRowRight"
ID="RibbonTabRowRight"
CssClass="s4-trc-container s4-notdlg">
<SharePoint:DelegateControl runat="server" ID="GlobalDelegate0" ControlId="GlobalSiteLink0" />
<div class="s4-trc-container-menu">
<div>
<wssuc:Welcome id="IdWelcome" runat="server" EnableViewState="false">
</wssuc:Welcome>
<wssuc:MUISelector ID="IdMuiSelector" runat="server"/>
</div>
</div>
<SharePoint:DelegateControl ControlId="GlobalSiteLink2" ID="GlobalDelegate2" Scope="Farm" runat="server" />
<span>
<span class="s4-devdashboard">
<Sharepoint:DeveloperDashboardLauncher
ID="DeveloperDashboardLauncher"
NavigateUrl="javascript:ToggleDeveloperDashboard()"
runat="server"
ImageUrl="/_layouts/images/fgimg.png"
Text="<%$Resources:wss,multipages_launchdevdashalt_text%>"
OffsetX=0
OffsetY=222
Height=16
Width=16 />
</span>
</span>
</SharePoint:SPRibbonPeripheralContent>
</SharePoint:SPRibbon>
</div>
<div id="notificationArea" class="s4-noti">
</div>
<asp:ContentPlaceHolder ID="SPNavigation" runat="server">
<SharePoint:DelegateControl runat="server" ControlId="PublishingConsole" Id="PublishingConsoleDelegate">
</SharePoint:DelegateControl>
</asp:ContentPlaceHolder>
<div id="WebPartAdderUpdatePanelContainer">
<asp:UpdatePanel
ID="WebPartAdderUpdatePanel"
UpdateMode="Conditional"
ChildrenAsTriggers="false"
runat="server">
<ContentTemplate>
<WebPartPages:WebPartAdder ID="WebPartAdder" runat="server"/>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="WebPartAdder" />
</Triggers>
</asp:UpdatePanel>
</div>
</div>

Here you go this should be the Ribbon:
Ribbon Row can be found in the css file of your Masterpage:
The Class/ID is 'body #s4-ribbonrow'
The Default CSS is:
min-height:43px;
background-color: #21374c;
just replace the bgColour and you will be fine.

Related

Error when building nested ListView with Control Parameter

I cannot figure out why I am getting this error.
Original VB Code:
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:db %>" SelectCommand="GetMasterBusinessCategories" SelectCommandType="StoredProcedure">
</asp:SqlDataSource>
<asp:ListView ID="lViewMasterCategories" runat="server" DataSourceID="SqlDataSource1">
<ItemTemplate>
<div class="col-md-6">
NAME here
<div class="row">
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:db %>" SelectCommand="GetBusinessSubCategoriesByParentID" SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:ControlParameter Name="ParentID" ControlID="lViewMasterCategories" PropertyName="ID"/>
</SelectParameters>
</asp:SqlDataSource>
<asp:ListView ID="lViewSubCategories" runat="server" DataSourceID="SqlDataSource2">
<ItemTemplate>
<div class="col-md-6"></div>
sub-category here
</ItemTemplate>
</asp:ListView>
</div>
</div>
</ItemTemplate>
</asp:ListView>
Stored Procedure(s):
Select ID,CategoryName from BusinessDirectoryCategories with(nolock)
where IsParent = 1 order By CategoryName
and
Select ID,CategoryName from BusinessDirectoryCategories with(nolock)
where ParentID = #ParentID order By CategoryName
(both stored procedures are good and returning correct values)
Error:
enter image description here

How to use KendoDatePicker within x-kendo-template in .NET Core

I have a popup editor template working for when I want to add/edit a row in my Kendo grid and it is bound to the model's properties. The issue is that I am unable to get Kendo widgets (e.g. datepicker or dropdownlist) to generate inside the kendo-template (primarily wanting to use taghelpers). Nor have I been able to use jQuery to convert inputs into kendo widgets on $(document).ready(). How can I do this?
My grid:
<kendo-grid name="accountsGrid" height="500" on-detail-init="onDetailInit">
<datasource type="DataSourceTagHelperType.Ajax" page-size="10">
<transport>
<read url="?handler=Accounts&id=#Model.Id" data="getAntiForgeryKeyValue" type="POST" />
<create url="?handler=CreateAccount&id=#Model.Id" data="getAntiForgeryKeyValue" type="POST" />
<update url="?handler=EditAccount&id=#Model.Id" data="getAntiForgeryKeyValue" type="POST" />
</transport>
<schema>
<model id="AccountId">
<fields>
<field name="LastUpdateDate" type="Date"></field>
</fields>
</model>
</schema>
</datasource>
<columns>
<column field="Id" hidden="true" />
<column field="AccountName"
title="Account Name"
header-html-attributes='HeaderHtmlAttribute(title:"Account Name")' />
<column field="LastUpdateDate"
title="Last Updated"
format="{0:MMMM dd, yyyy}"
header-html-attributes='HeaderHtmlAttribute(title:"Last Updated")' />
<column title="Actions"
header-html-attributes='HeaderHtmlAttribute(title:"Actions")'
html-attributes='new Dictionary<string, object> {["class"] = "center-cell" }'>
<commands>
<column-command name="edit" />
</commands>
</column>
</columns>
<toolbar>
<toolbar-button name="create" template="getTelerikButton('Add')" />
</toolbar>
<editable mode="popup" template-id="accountEditorTemplate" />
<pageable button-count="5" refresh="true" page-sizes="new int[] { 5, 10, 20 }">
</pageable>
<scrollable enabled="true" />
My Editor Template:
<script id="accountEditorTemplate" type="text/x-kendo-template">
<div class="row editor-padding">
#*Account Details*#
<div class="col-md-6 col-xs-12">
<h5 class="editorTemplateHeader">Account Details</h5>
<div class="k-edit-label">
<label for="AccountName">Account Name</label>
</div>
<div class="k-edit-field">
<input required type="text" class="k-input k-textbox" name="AccountName" validationmessage="Account Name is required" maxlength="8" />
</div>
<div class="k-edit-label">
<label for="Description">Description</label>
</div>
<div class="k-edit-field">
<input type="text" class="k-input k-textbox" name="Description" maxlength="100" />
</div>
<div class="k-edit-label">
<label for="ExpirationDate">Expiration Date</label>
</div>
<div class="k-edit-field">
#*I would like to do this, but nothing appears*#
<kendo-datepicker name="ExpirationDate"></kendo-datepicker>
</div>
</div>
</div>
I resolved the problem. It involved using data- syntax. Below is the solution:
<div class="k-edit-field">
<input required type="text"
name="ExpirationDate"
data-type="date"
data-bind="value:ExpirationDate"
data-role="datepicker"
validationmessage="Expiration Date is required" />
</div>

Images are not displaying in asp.net webforms

I have image links of a website's images stored in my DB but when I show them on my asp page using repeater or data list which im building, it shows some where pics and somewhere just boxes and no
image, can anyone help me?
here is my datalist code to show products but some images are being shown and some are like broken icons and empty box having no image, and i have image links of a website which i am displaying in
data list and i have checked all links as well on web they work perfectly fine but don't show anything in my data list web form,is this a styling issue or binding?
code of Data list is given below
<div style=" border:inset; margin-left:100px; display:inline-block;">
<asp:DataList ID="DataList1" runat="server" RepeatColumns="5" RepeatDirection="Horizontal">
<ItemTemplate>
<div class="span4" style="display:inline-block; border-top:1px; background-color:none;width:190px; height:440px; border:solid; border-width:1px; border-spacing:2px 4px; border-bottom:inset; border-top-width:1px;" runat="server"><br />
<div class="products" style="height:430px; width:189x; border:inset;border-style:none;border-spacing:2px 4px;">
<asp:Image ID="ImgId" runat="server" style=" height:160px; width:160px;" ImageUrl='<%#(DataBinder.Eval(Container.DataItem,"ImageLink")) %>' /> <br />
<h3 class="title" style="font-family:Pristina;font-size:medium;height:30px; margin-bottom:-15px;"> <b><%# Eval("Name") %></b><br /><br /><br /></h3>
<br />
<p class="price" style="font-family:Pristina;font-size:medium; height:30px;padding-top:40px; "><b>Price</b> <%# Eval("Price") %> <br /><br /><br /><br /><br /></p><br />
<br />
<b style="margin-bottom:-20px">www.shophive.com</b>
</div>
</div>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" VerticalAlign="Top"/>
</asp:DataList>
</div>

JSSOR with ASP.NET dynamic image

Here is my HTML Code that i am using
<div u="slides">
<div>
<asp:SqlDataSource ID="1" runat="server" ConnectionString="<%$ ConnectionStrings:constr %>" SelectCommand="SELECT Image FROM Gallery"></asp:SqlDataSource>
<asp:Repeater ID="Repeater1" runat="server" DataSourceID="1">
<ItemTemplate>
<img u="image" src="<%# "image.ashx?Id="+ Eval("Id") %>" />
</ItemTemplate>
</asp:Repeater>
</div>
The Generic Handler .ashx for the image is THIS
My Issue is that on the Slide, only the last image uploaded come out.
For example, if i uploaded 5 images, only the fifth last uploaded image come up on the slider and it remains static.
I have tested the same generic Handler. it works normal for another slider.
am i missing something.
P.S - the Jssor scripts and css are all in their default values.
nothing was edited.
You placed all images in a single slide.
Please create slide for every image as below.
<div u="slides">
<asp:SqlDataSource ID="1" runat="server" ConnectionString="<%$ ConnectionStrings:constr %>" SelectCommand="SELECT Image FROM Gallery"></asp:SqlDataSource>
<asp:Repeater ID="Repeater1" runat="server" DataSourceID="1">
<ItemTemplate>
<div>
<img u="image" src="<%# "image.ashx?Id="+ Eval("Id") %>" />
</div>
</ItemTemplate>
</asp:Repeater>
</asp:SqlDataSource>
</div>

asp.net ajax accordion menu categories?

I got 2 sql tables, Categories and Posts. I select top 5 record for each category. But when I use it on accordion menu, it shows category names for each post(repeating).
Here is my code:
<asp:Accordion ID="accMenu" runat="server" DataSourceID="ods_menu" RequireOpenedPane="false">
<HeaderTemplate>
<h3><%# Eval("kategori_adi") %></h3>
</HeaderTemplate>
<ContentTemplate>
<div>
<ul>
<li><asp:HyperLink ID="HyperLink1" runat="server" Text='<%# Eval("post_etiket") %>'>'></asp:HyperLink></li>
</ul>
</div>
</ContentTemplate>
</asp:Accordion>
<asp:ObjectDataSource ID="ods_menu" runat="server" SelectMethod="MenuGetir" TypeName="yonet"></asp:ObjectDataSource>
And my SQL command is like this (I want to select top 5 post for each category):
select top 25 p.post_id,p.post_etiket,k.kategori_id,k.kategori_adi
from post p, kategori k
where k.kategori_id= p.post_kategori_id order by post_date
How can i solve this problem?
Maybe help someone
<HeaderTemplate>
<h3><%# Eval("kategori_adi") %></h3>
</HeaderTemplate>
<ContentTemplate>
<div>
<ul >
<asp:Repeater ID="rp_altmenu" runat="server" DataSourceID="ods_alt_menu">
<ItemTemplate>
<li><asp:HyperLink ID="HyperLink1" runat="server" Text='<%# Eval("post_etiket") %>'></asp:HyperLink></li>
</ItemTemplate>
</asp:Repeater>
</ul>
</div>
</ContentTemplate>
</asp:Accordion>
<asp:ObjectDataSource ID="ods_kategori" runat="server" SelectMethod="KategoriGetir" TypeName="yonet">
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="ods_alt_menu" runat="server" SelectMethod="AltMenuGetir" TypeName="yonet"></asp:ObjectDataSource>
</div>
SQL sp codes of AltMenuGetir
#kategori_id int
AS
select top 5 post_id,post_etiket
from post
where post_kategori_id= #kategori_id
order by post_tarihi
SQL codes of KategoriGetir
select * from kategori
and codebehind:
protected void accMenu_ItemDataBound(object sender, AjaxControlToolkit.AccordionItemEventArgs e)
{
yonet.kategori_idy=Convert.ToInt32(DataBinder.Eval(e.AccordionItem.DataItem, "kategori_id").ToString());
}