Tag: remove

SPSecurity.RunWithElevatedPrivileges(delegate() { using (SPSite site = new SPSite("YOURSITE")) { using (SPWeb web = site.OpenWeb()) { //Obtain the page PublishingPageCollection publishingPages = PublishingWeb.GetPublishingWeb(web).GetPublishingPages(); PublishingPage page = publishingPages.FirstOrDefault(f => f.Uri.AbsoluteUri == "YOURPAGE"); […]
In order to disable the ENTER key in your textbox type input, you have to add the ‘onkeydown’ attribute and call a javascript function that checks the key and avoid […]
If we couldn’t acces to the menu item “Edit Page” for any reason and we want to edit that page (e.g. to remove some webpart that blocks our page) we’ve […]
You can remove any href that contains specific text inside the link. If you want to remove the link to any page that contains “DispForm” you can do it like […]
In order to avoid ENTER key in your asp:TextBox you’ve to add onkeydown event and control it, like this: <asp:TextBox ID="myTextBox" runat="server" onkeydown="return (event.keyCode != 13);"></asp:TextBox>
Sometimes, when you’re developing a visual web part, the designer file (with .g.cs extension) dissapears in front of your eyes. After finding nothing in the internet, we’ve just discovered why […]