New answers tagged 2007
0
Picture Library Schema contains fields ImageWidth and ImageHeight. You could get it in your receiver. For example:
public override void ItemAdding(SPItemEventProperties properties)
{
if (properties.AfterProperties["ImageWidth"].ToString() == "300" &&
properties.AfterProperties["ImageHeight"].ToString() == "300")
{
//your code ...
0
If you check this link out: Information about the characters that you cannot use in site names, folder names, and file names in SharePoint. You will see that the "+" is not allowed. Its seems that SharePoint have removed the illegal character for you and that is why it works.
0
I found a way to do it:
SPSecurity.RunWithElevatedPrivileges(delegate()
{
using (SPWeb web = properties.OpenWeb())
{
var list = web.Lists[properties.ListTitle];
SPListItem listItem = list.GetItemById(properties.ListItem.ID);
...
1
Verify that all of the assets used in the master page and the page layout are checked in and published. This includes CSS, Images, Javascript, etc.. If there is any custom code, verify that it also does not reference unpublished assets or other lists/libraries that have restrictive security.
0
@Loki
Same issue here. I restored some subsite under /sitedirectory using the stsadm -includeusersecurity parameter.
(stsadm -o import -url http://ourpoortal.com/sitedirectory/somesubsite -filename d:\somefolder\filename.exp -includeusersecurity -versions 4)
We don't use inheritance under /Sitedirectory so all subsites have explicit permissions.
Permisisons ...
1
You must cast the field to a SPFieldLookup. This object has members like
LookupList,
LookupField and
LookupWebId
that will help you identify the correct list and field
See the MSDN documentation here
1
You can created CrossList dataview web parts, content query web parts, or custom web parts created in Visual Studio to consolidate the data.
The more straightforward approach would be to just use Content and Structure or Open in Windows Explorer to move files into a central document library. No development overhead, the only downside is if anyone had RSS ...
3
I got the following code from the MDSN on line libray:
<%@ Page Language="C#" %>
<%@ Reference Control="~/Controls/Spinner.ascx" %>
<script runat="server">
private ASP.Spinner Spinner1
protected void Page_Load(object sender, EventArgs e)
{
Spinner1 = (ASP.Spinner)LoadControl("~/Controls/Spinner.ascx");
}
protected void ...
1
The problem turned out to be a firewall issue. There was an IP that was ONE number off, and it broke our connection to the outside world .. hence, no RSS. :)
1
Take reference to lookup list and use List.GetItemById(Id) to get the item and take the column value and construct the lookup collection.
Example:
SPList lookupList=properties.web.lists["lookupListName"];
SPListItem lookuplistitem=lookupList.GetItemById(4); //Here Id is 4
string filedvalue=lookuplistitem["lookupfieldname"];//Which field you are taking as ...
0
As per my understanding there are two lookups from same list/library. SPFieldLookupValueCollection for each field is different.
The format is ID;#Value
here ID is listitem ID and Value is what you stored for respective fields in lookup list.
For "LookUpField" "ID;#LookUpFieldValue"
For "LookUpFieldWithPicker" "ID;#LookUpFieldWithPickerValue"
Before ...
0
for usercontrol only!
public partial class myUserControl : UserControl
{
public string TextBox1Text
{
get
{
return Page.Session["TextBox1Text"] as string;
}
set
{
Page.Session["TextBox1Text"] = TextBox1.Text;
}
}
}
the above is fine! you now need to put value into it ...
0
i use this method to sovle my issue : thanks you all for help
http://msdn.microsoft.com/en-us/library/ff649867.aspx
try
{
// Loads a user control
MyUserControl myUserControl = (MyUserControl)Page.LoadControl("~/_controltemplates/MyWebPart/MyUserControl.ascx");
myUserControl.Web = SPContext.Current.Web;
myUserControl.TextColor = ...
1
i solve the mistake i was using
UserControl myUserControl = (UserControl)Page.LoadControl("~/_controltemplates/MyWebPart/MyUserControl.ascx");
whenever i was needing to use,
MyUserControl myUserControl = (MyUserControl)Page.LoadControl("~/_controltemplates/MyWebPart/MyUserControl.ascx");
0
Yes you can do this with XSL and CAML. I have done similar to create a Risk Matrix which is detailed on my blog. You will have to adjust the concept to meet your own requirements but it should hopefully point you in the right direction.
Depending on what you want to achieve you could also create a basic bar chart in the XSL sizing SPAN objects based on ...
0
Assuming you mean that list1 CREATES an item in list2 (rather than copy)
In Sharepoint deisgner workflow.. in the Create New List Item dialog box there is an option to "Overwrite the Existing File"... this may do it for you.
0
The option you are describing is only applicable in Links lists.
1
I achieved my goal. when i was went to this Site
and added this attribute tot he control that i wish to exclude from the functionality of Speeling Checking Control. It's working.
0
Dive into your Read permission level and verify that the following options are checked:
View Application Pages
View Pages
Use Remote Interfaces
Use Client Integration Features
Those not being checked would cause the exact behavior you describe
1
please follow this to get/set webpart properties!
Question about webpart properties
also like to note that every time you do a refresh the properties are reset ;) so what you want todo is not set anything in the ascx page but rather within the webpart itself!
any hoo as you requested (NOT the above method but sticking to (parent to ascx)):
in your ...
0
Try that code for your Web Part:
public class CVWebPart: WebPart
{
const int c_A = 1;
public CVWebPart() {}
[SPWebCategoryName("who CV id")]
[DefaultValue(c_A)]
[Personalizable(PersonalizationScope.Shared)]
[WebDisplayName("A")]
[WebDescription("")]
[WebBrowsable(true)]
private int _A;
public int A
{
get ...
0
I solved the issue having the following url:
<UrlAction Url="javascript:function GoToUrl(){var site='{SiteUrl}';var item='{ItemId}';var list='{ListId}';window.location.href=site+'/_layouts/Pages/InterPage.aspx?list='+list+'&ID='+item};GoToUrl();return false;"/>
0
After some investigation i understood the issue, it seems that the editcontrolblock is rendered by javascript and basically server side you can't do much. And there is no way doing that.
Hope this helps someone in the future!
2
Not directly from within SharePoint, at least not without close collusion with your AD administrators as well as some aggressive scripting. Besides, you would only be protecting SharePoint and it sounds like this is really a much larger issue that affects the whole company.
A better approach would be to look at your firewall or routing hardware and see if ...
0
you can manually manage the list of users who are allowed to access the site. Instead of using All Authenticated Users create a new Group, insert all of the employees into it, and when they leave/are terminated you can remove them from it.
2
SOLUTION: you on x64 bit machine so solution is that there is no problem but you are using the wrong IE shortcut.
There are different IE versions you have on 64bit, you will see..
•Internet Explorer (64-bit) - won't show any sharepoint add-ons and wont work
•Internet Explorer (No Add-ons) - won't show any sharepoint add-ons and wont work
•Internet ...
0
Your syntax is a little wonky. I also added some jQuery inside your hidefields function instead of the native JS you were using.
Try this...
$(document).ready(function () {
$().SPServices({
operation: "GetGroupCollectionFromUser",
userLoginName: $().SPServices.SPGetCurrentUser(),
async: false,
completefunc: function ...
1
//method that will be getting the controls
using (SPSite bigSite = new SPSite("http://bigPortal.bbbb.com/bb/bbWeb"))
{
using (SPWeb bigWeb = bigSite.OpenWeb())
{
GetControlsRecursively(Page.Controls);
}
}
//the list that will store the controls
private IList<Control> _controlsList = new ...
4
Like Robert said it's not possible to do it entirely using Out of box components, however I think you can use JavaScript to capture click events on your picture library and then forward user to a form (which you definitely will need to fill not sure what form will be for and whether it will save data any where) but then you can few code to that form save ...
1
First of you need to get hold of the page and not just the web object. Like this:
page = web.GetObject(pageUrl) as SPListItem;
But even then it would be tricky to get all controls. What is your objective? Maybee there is a better way of establishing what you want
1
Not without some customizations (Read custom code).
Like a new webpart listing the images and does some magic on clicking of an item, or maybee a custom event receiver that triggers some workflow
0
Try this -
1) Make a backup copy of the original new and edit forms.
2) Rename the custom new and edit forms as - NewForm.aspx & EditForm.aspx, respectively. To avoid naming conflicts with the original ones, save them under new names (make sure when SharePoint asks you to update links, you hit No button!)
3) Refresh (Ctrl+f5) the list view page, and ...
1
My problem solved -
Upon examining the DispForm.aspx page in SharePoint Designer, as I have mentioned before, the content of the Multiple Lines Rich Text type column is displayed using the XSLT code -
<xsl:value-of select="@Progress_x0020_Comments"/>
The solution is to include the attribute "disable-output-escaping" and set it to "yes"
So the ...
0
Before you go to those lengths, verify that the load balancer that is out front is actually configured to use 'sticky' sessions as not having that set can cause this exact behavior. have them physically check the box, not refer to some documentation. I've seen cases where people 'fixed' load balancing by switching to Round Robin and not telling anyone. It ...
1
I suggest you to use BDC (Business Data Catalog) in Sharepoint 2007. BCS is an upgraded version of BDC in Sharepoint 2010. So since you are using 2007, you should look for BDC.
You can use the BDC Web Parts to View, Update, Create, Delete items to the database.
Here is a tutorial to get you started:
...
0
No not that i know of! any way that you chose you would need to create some code! there are alot of examples out there on the net!
For your issue it shouldnt be hard atall! just create three stored procedures for each task in SQL server, make sure you give each stored procedure the correct permission.
create your custome webpart and call the stored ...
0
what you are looking for is business connectivity services. now I am not sure if this existed with the same functionality in 2007.
http://pravahaminfo.blogspot.be/2011/06/business-connectivity-services-bcs-in.html
0
The approach I take is:
Navigate to the form in IE/Firefox. If in IE hit F12 to bring up the Developer Tools. If using FireFox, download the Firebug addon and then hit F12.
Use the selector tool to highlight the field that is having a short input.
Note the class, specifically one that shows the width.
Create a CSS file that overrides that style.
Upload it ...
1
Try the actual STSADM Command renameWeb (for the actual sub-site - http://technet.microsoft.com/en-us/library/cc263508(v=office.12).aspx) or renameSite (for a site collection - http://technet.microsoft.com/en-us/library/cc263038(v=office.12).aspx).
0
Powershell to the rescue! Try this:
SharePoint 2010
Get-SPWeb http://some.domain/PathTo/SiteUrl.aspx | Set-SPWeb -RelativeUrl SiteUrl
SharePoint 2007
*note: this is pseudocode as I do not have a SP2007 environment to test this on. It should be pretty close though
[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
$site = ...
3
I copy pasted your code and got a
'System.Convert' does not contain a definition of 'Todecimal'
and
'A local variable named a is already in defined in this scope'
Rewriting your code to a simple console app I didn't get any error at all:
Decimal a = Convert.ToDecimal("10.0000000000000000");
decimal b = ...
1
SharePoint does not require a Web Application to be listening on port 80, but I would suggest looking at host header mode so you can have multiple IIS sites on port 80.
2
You configure the port when you create your web applications, not during installation or configuration. But, the farm setup wizard will probably try to set up the initial web app on port 80, so just skip that and create the web app manually through Central Admin. There, you can specify the port.
1
The Alert Feature should works. You can get an email every time the post is update
0
You can't interact with SharePoint list or libraries without using web services for SharePoint 2007 even then you will need an app which will access and cross-pond to that specific web services.
There isn't any free or opensource product out yet, however my company has a product which might give you some idea as for what you want to achieve.
...
Top 50 recent answers are included



